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

Add link protocol field customization #3421

Merged
merged 6 commits into from
Sep 17, 2019
Merged

Add link protocol field customization #3421

merged 6 commits into from
Sep 17, 2019

Conversation

jacekbogdanski
Copy link
Member

What is the purpose of this pull request?

New feature

Does your PR contain necessary tests?

All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

What is the proposed changelog entry for this pull request?

[#2227](https://github.com/ckeditor/ckeditor-dev/issues/2227): Added [`config.link_defaultProcotol`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-link_defaultProtocol) configuration option that allows setting default URL protocol for [Link](https://ckeditor.com/cke4/addon/link) plugin dialog.

What changes did you make?

Closes #2227

@f1ames f1ames self-requested a review September 16, 2019 15:11
@f1ames f1ames self-assigned this Sep 16, 2019
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit tests

  • Chrome (CI) 🚨 - see CI
  • Firefox (CI) 🚨 - see CI
  • Safari ✅
  • IE8 ✅
  • IE11 ✅
  • Edge ✅

http://localhost:1030/#tests/is:unit,path:/tests/plugins/link,path:/tests/plugins/autolink,path:/tests/plugins/tableselection/integrations/link

Manual tests

  1. There is an issue with <other> protocol - after selecting it, and reopening dialog default one is used:

2227 i1

  1. Setting non-existent value or <other> results in empty Protocol value:

image

I'm for adding list of available values to link_defaultProtocol property docs, mentioning also that it can't handle custom values. I was thinking that this list should also include <other>, however it seems it is a replacement for empty/no-protocol and it has no value so might problematic to set:

image

Let's skip it.

Code

See code comments.

plugins/link/dialogs/link.js Show resolved Hide resolved
plugins/link/plugin.js Outdated Show resolved Hide resolved
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 And I see handling <other> was easier than I thought 👏


Unit tests

Chrome (CI) ✅
Firefox (CI) ✅
Safari ✅
IE8 ✅
IE11 ✅
Edge ✅

Manual tests

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use "https" as default protocol for links
2 participants