-
Notifications
You must be signed in to change notification settings - Fork 884
feat: allow to override link validation check, and accept mailto and other links by default #2525
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EchoEllet
commented
Mar 27, 2025
CatHood0
requested changes
Mar 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll test it as soon as possible.
CatHood0
approved these changes
Mar 27, 2025
My bad jasj. |
I will change to draft and add the tests soon before merging this PR. |
EchoEllet
commented
Mar 27, 2025
singerdmx
approved these changes
Mar 31, 2025
EchoEllet
commented
Apr 15, 2025
EchoEllet
added a commit
that referenced
this pull request
Apr 18, 2025
I have added the tests in 79cdb52. |
…validation in the toolbar, allows to insert mailto and other links by default
I will merge since all changes are in place, I only added tests since last the code review. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Allow the toolbar to insert links like
mailto
by default, allow to override the link validation with a callback rather than Regex to give users more control, improve doc comment ofcustomLinkPrefixes
and legacy code and confusing naming, adharing to common best practices.customLinkPrefixes
which is in the editor, is only used to check whether this link is valid, if it's invalid,https://
will be appended as prefix to the link (google.com
->https://google.com
).validateLink
inQuillToolbarLinkStyleButtonOptions
allows the validation check to be overridden to determine whether this link can be inserted.However,
AutoFormatMultipleLinksRule
still uses the old regex and doesn't supportmailto
and the others.To test this branch:
Related Issues
http://
orhttps://
#2492Type of Change