Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "https" as default protocol for links #2227

Closed
seeallie opened this issue Jul 13, 2018 · 11 comments · Fixed by #3421
Closed

Use "https" as default protocol for links #2227

seeallie opened this issue Jul 13, 2018 · 11 comments · Fixed by #3421
Assignees
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:link The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Milestone

Comments

@seeallie
Copy link

Type of report

Feature request

Provide description of the new feature

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

@Comandeer Comandeer added type:feature A feature request. status:confirmed An issue confirmed by the development team. labels Jul 14, 2018
@Comandeer
Copy link
Member

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?

@mlewand
Copy link
Contributor

mlewand commented Jul 16, 2018

@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.

@mlewand mlewand added good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. target:major Any docs related issue that should be merged into a major branch. plugin:link The plugin which probably causes the issue. labels Jul 16, 2018
@wwalc
Copy link
Member

wwalc commented Jul 20, 2018

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)

@mlewand
Copy link
Contributor

mlewand commented Aug 1, 2018

Somewhat related issue; #2277.

@seeallie
Copy link
Author

seeallie commented Aug 6, 2018

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

@mlewand
Copy link
Contributor

mlewand commented Sep 17, 2018

@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!

@seeallie
Copy link
Author

@mlewand I tested out the "https" behavior in the codepen for preview: it worked as expected & thanks!

@mlewand
Copy link
Contributor

mlewand commented Sep 18, 2018

@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.

@jacekbogdanski jacekbogdanski self-assigned this Sep 16, 2019
@f1ames f1ames added this to the 4.13.0 milestone Sep 16, 2019
@mohitnegi724
Copy link

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.

@f1ames
Copy link
Contributor

f1ames commented Sep 30, 2019

@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 the option.

You may report a separate feature request issue for this one.

@kiknadze
Copy link

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://';
        }
      });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:link The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants