Ticket #625 (confirmed New Feature)

Opened 7 years ago

Last modified 3 years ago

Relative URLs

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

Description

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:
http://sourceforge.net/tracker/index.php?func=detail&aid=1171898&group_id=75348&atid=543656

Attachments

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

Change History

comment:1 Changed 7 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"
selected="selected">&lt;other&gt;</option>
</select>

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 6 years ago by w.olchawa

  • Keywords Confirmed HasPatch added

comment:3 Changed 6 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 6 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 3 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 3 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" https://bugzilla.mozilla.org/show_bug.cgi?id=613517

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:

http://forge.typo3.org/issues/28497

Thanks,

Mark

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