Feature request
Change the default protocol for links to "https" from "http". https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/link/dialogs/link.js line 268
I understand reason of this feature request (as Chrome starts to mark non-HTTPS sites as non-secure), but I'm quite skeptical. @seeallie, do you have any statistics showing that HTTPS adoption is high enough to justify such switch?
@Comandeer @seeallie Firstly I can see it as an opt-in feature rather than rolling out https as a default protocol. That way the editor does not break installations that use plain http, yet is a config switch allowing to conveniently define the default protocol.
Jut a side note: technically this should be already possible with a few lines of code using the dialogDefinition event: https://ckeditor.com/latest/samples/old/dialog/dialog.html (Setting default values for dialog window fields)
Somewhat related issue; #2277.
My organization recently went through a process of replacing http with https in our web system ( includes several web platforms) whenever possible. If this is a current web best practice, it would make sense for this library to set it as the default protocol while allowing other options. In addition, as @wwalc pointed out, technically it involves "a few lines of code". I very much like the configuration proposal by @mlewand
@seeallie the works on the proposal continue, and we have a preview, where one of examples I used is https protocol for the dialog. If you'd like to share the feedback, please check the "Preview available" section in #2277. Thanks!
@mlewand I tested out the "https" behavior in the codepen for preview: it worked as expected & thanks!
@seeallie note that it's still a subject of discussion, we faced some challenges during the implementations that we need to solve before merging this feature. So make sure to keep an eye on that.
Hi,
Can I Add more protocols in CK Editors. I want to add "mailto:" and "tel:" in Protocol Dropdown. Is it Possible to do that?
I am using React.js.
@mohitnegi724 it's not possible at the moment, as documentation says:
Default URL protocol used for the Link dialog.
Available values are:
'http://'
'https://'
'ftp://'
'news://'
'' — An empty string for theoption.
You may report a separate feature request issue for this one.
I set link default values this way:
CKEDITOR.on('dialogDefinition', (ev) => {
if (ev.data.name == 'link') {
ev.data.definition.getContents('target').get('linkTargetType')['default']='_blank';
ev.data.definition.getContents('info').get('protocol')['default']='https://';
}
});
Most helpful comment
@Comandeer @seeallie Firstly I can see it as an opt-in feature rather than rolling out
httpsas a default protocol. That way the editor does not break installations that use plain http, yet is a config switch allowing to conveniently define the default protocol.