Opened 10 years ago

Closed 23 months ago

#625 closed New Feature (fixed)

Relative URLs

Reported by: calophi@… Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: SF HasPatch Cc: alfonsoml


It would be nice if there was a way to put in a relative URL from the link dialog box without having to select the protocol type as "other". Perhaps adding "Relative URL" to the list of URL types along with email and anchor would be appropriate, and just have it bring up a div similar to the normal URL but without the protocol?

Moved from SF:

Attachments (1)

fck_link.patch (717 bytes) - added by dzahler 8 years ago.
Patch to add optional argument in SetUrl method. Argument allows setting protocol in link dialog when using custom link browser.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by martinkou

  • Reporter changed from martinkou to calophi@…

I've just changed the default option in fck_link.html and it works fine for me:

<select id="cmbLinkProtocol">
	<option value="http://">http://</option>
	<option value="https://">https://</option>
	<option value="ftp://">ftp://</option>
	<option value="news://">news://</option>
	<option value="" fckLang="DlgLnkProtoOther"

No other changes are neccesary and I think that this is a better default as pasting a full link changes the option with the current js code.

Moved from SF. Original poster: alfonsoml

comment:2 Changed 9 years ago by w.olchawa

  • Keywords Confirmed HasPatch added

comment:3 Changed 9 years ago by w.olchawa

#592 has been marked as DUP

#592 had the same request and also a request for relative/absolute URL's in the image dialog. Since we have more information about this issue here #592 has been closed.

Changed 8 years ago by dzahler

Patch to add optional argument in SetUrl method. Argument allows setting protocol in link dialog when using custom link browser.

comment:4 Changed 5 years ago by markstos

It's been 3 years since a patch was submitted for this issue. Could someone comment on whether the patch will accepted, rejected, or need refinement?

We frequently use CKEditor to compose and send HTML emails, so we *always* want absolute URLs to be used. However, CKEditor changes our absolute links back to relative, which breaks them for the email recipients. Ticket #592 addressed exactly this issue, but it was merged back in here, although the requests seem distinct:

Here: Explicitly support relative links in the select drop down box #592: Allow an option to explicitly use absolute links, and don't convert them back to relative.

comment:5 Changed 5 years ago by markstos

It turns out that a Firefox bug could be partially or fully at fault here. Firefox was converting absolute URLs to relative in some cases. There's a bug report about that here:

"URL is not maintained for links or images after copy/paste in contenteditable"

This issue was addressed with a workaround in the JavaScript-based "Typo3" HTML editor. They used the approach of detecting of the browser was Firefox, and then converting URLs from relative back to absolute in some cases. You can see the Typo3 bug report about this issue here, which includes links to the "diff" showing how they fixed it:



comment:6 Changed 23 months ago by j.swiderski

  • Resolution set to fixed
  • Status changed from confirmed to closed

I don't see this problem in CKEditro 4.x. I'm closing issue as Fixed.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy