-
Notifications
You must be signed in to change notification settings - Fork 907
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. |
wangjinshan
pushed a commit
to wangjinshan/flutter-quill
that referenced
this pull request
Apr 29, 2025
* master: (83 commits) Add copyWith methods to DefaultStyles, HorizontalSpacing, and VerticalSpacing (singerdmx#2550) docs: update migration guide to relfect singerdmx#2529 chore(release): prepare to publish 11.4.0 feat: allow to override link validation check, and accept mailto and other links by default (singerdmx#2525) chore(release): prepare to publish 11.3.0 Fix selection in readOnly mode, Add magnifier via RawMagnifier widget (singerdmx#2529) Clarify platform support of QuillEditorConfig.onKeyPressed (singerdmx#2542) chore(release): prepare to publish 11.2.0 feat: cache for toPlainText in Document to avoid unnecessary text computing (singerdmx#2482) chore(example): update deps chore(release): prepare to publish 11.1.2 fix: QuillEditor doesn't respect the system keyboard brightness by default on iOS (singerdmx#2522) chore(release): prepare to publish flutter_quill_test chore(release): prepare to publish 11.1.1 Chore: general improvements in flutter_quill_tests API (singerdmx#2512) Explicitly schedule frame on secondary click. (singerdmx#2507) chore(release): prepare to publish 11.1.0 fix: unpredictable endless loop of '_handleFocusChanged' in the phase of page route changing when editor is set to readonly. (singerdmx#2488) feat: Enable BoxDecoration for DefaultTextBlockStyle of header Attribute (singerdmx#2438) Expose Rule type so that Document.setCustomRules can be used (singerdmx#2484) ...
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