Jump to content
jsantari

CKEditor auto complete in link editing

Recommended Posts

When editing content with ckeditor and I want to add an external link in the content the link dialog is automatically putting http:// at the front of the link no matter what I do. Is there a way to disable this behavior?

Share this post


Link to post
Share on other sites

Just curious, if it is an external link, why would you want to remove the http:// ?

Edited by MindFull
typo

Share this post


Link to post
Share on other sites

You can change the network protocol, after http:// is added to your link. But http:// is better than nothing. ;)

Share this post


Link to post
Share on other sites

Sorry, should have clarified the why for this. I host clients on hostgator and back in the spring they changed a mod security rule on the server which causes any url with an http or https in it to throw a 403 forbidden error. So when you go to edit a link you have created it errors and the dialog displays the error. Only way to fix it is to get on support with HG go through a couple of levels and then get them to whitelist the domain for the security rule which is causing it (they don't tell you what it is). This is the url that crashes it: http://northernaire.com/webadmin/page/link/?id=1322&modal=1&href=http%3A%2F%2Fwww.vilaswi.com%2Foutdoor-fun%2Fcross-country-skiing-snowshoeing%2F

Take out the http on the call and it will load. I was going to look at trying to look at a way to hack something to get it to work on the output end.

Just a pain to have to go through the process of whitelisting for a new PW install.

Share this post


Link to post
Share on other sites
1 hour ago, jsantari said:

I host clients on hostgator and back in the spring they changed a mod security rule on the server which causes any url with an http or https in it to throw a 403 forbidden error.

That is insane. Maybe time to move to a new host.

  • Like 1

Share this post


Link to post
Share on other sites

Wow, that's strange that they would do something like that.

In ProcessPageEditLink.js, I see this

// avoid adding scheme if we already added it before and user removed it
			if ($this.attr('data-ignore') == domain) {
				// do nothing
			} else {
				$this.val('http://' + val);
				$this.closest('.InputfieldContent').find('.notes').text('http://' + val); 
				$this.attr('data-ignore', domain);
			}

So it looks like if you delete the http://  once or twice, it should stop auto-filling.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By prestoav
      Hi all and thanks for the great work on PW!

      One thing I find I have to do on any new site is add the Justify plugin to textarea fields as it is such a widely required feature for text headings in content.

      ANy chance this could be added to the core an automatically be installed on new textarea fields using CKEditor?

      Thank you!
    • By AndréPortuga
      Does anyone knows if there is a way of selecting a iframe inside a textfield(using ckEditor)? 
      I mean I have a Iframe with this code:
      <iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" scrolling="no" src="https://www.youtube.com/embed/PMaFJjZDrYM" width="100%"></iframe></p>
       
      but it's not getting responsive in iPhones.. So anyone know how can I select it via code for making it responsive?
       
      Thank you,
    • By dragan
      On one particular site, CKEditor behaves rather weird:
      When I copy and paste "normally", i.e. CTRL + V, there is an alert popping up "do you really want to leave this page?". If you cancel, the text is pasted into the field. If not, you get redirected to the frontend of the page you just edited, and the changes are lost.
      The "paste from Word" button doesn't work. CTRL + SHIFT + V works, but all formatting is lost (apart from paragraphs).
      I'm using inline editor mode, ACF + Purifier are activated. I know that if I disable those two, CTRL + V works, but I won't do that, since CKE then saves all the garbage code from MS-Office.
      Has anyone ever come across this issue? I tried with Chrome + FF. No JS errors.
    • By AndZyk
      Hello,
      I am currently building a intranet which will be hosted on the local network of a company. This intranet has many links to files on their fileserver with the protocol file://.
      So for example the links look like this file://domain.tld/filename.ext
      When I try to insert such a link into a URL field, I get the error, that only the protocol http:// is allowed. When I try to insert such a link into a CKEeditor link, it gets stripped out. Is it possible to insert such links into the FieldType URL and CKEditor.
      I know that I could use a FieldType Text or insert a RewriteRule in the .htaccess file, but I am looking for a more elegant solution. 😉
      Regards, Andreas
    • By prestoav
      Hi folks.
      I'm building a Formbuilder form to create new advert pages in a marketplace. Formbuilder is ideal for this. I need to add a description field that allows text to be added with line breaks etc. so showing a CKEditor field would be ideal (i.e. exactly like the field I'm typing into right now)!.
      Does anyone know if it's possible to add a CKEditor field to the front end presentation fo a Formbuilder field, maybe via a module or such?
      Many thanks!
×
×
  • Create New...