-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
FIX: Links: Can't add plain text after insert link at end of paragraph #2483
Conversation
function isLinkBoundary( fragment ) { | ||
return fragment.childNodes && fragment.childNodes.length === 1 && | ||
fragment.childNodes[ 0 ].nodeName === 'A' && fragment.childNodes[ 0 ].text.length === 1 && | ||
fragment.childNodes[ 0 ].text[ 0 ] === '\uFEFF'; |
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.
It's fine for now, but maybe this character could be included in a constant somewhere in TinyMCE to avoid issues if it's changed.
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.
@youknowriad there's a function in TinyMCE we can look at exposing
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.
This fixes the remaining link when splitting paragraphs. The other part of the issue is still unsolved but we may consider it "won't fix" (Entering text at the end of the paragraph)
Codecov Report
@@ Coverage Diff @@
## master #2483 +/- ##
==========================================
- Coverage 26.93% 26.92% -0.01%
==========================================
Files 158 158
Lines 4897 4898 +1
Branches 814 816 +2
==========================================
Hits 1319 1319
+ Misses 3035 3034 -1
- Partials 543 545 +2
Continue to review full report at Codecov.
|
@youknowriad at the moment you need to right arrow after the link to escape it |
fixes #1246