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

FIX: Links: Can't add plain text after insert link at end of paragraph #2483

Merged
merged 1 commit into from
Aug 21, 2017

Conversation

tg-ephox
Copy link
Contributor

fixes #1246

@tg-ephox tg-ephox requested a review from youknowriad August 21, 2017 04:40
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';
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

@youknowriad youknowriad left a 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
Copy link

codecov bot commented Aug 21, 2017

Codecov Report

Merging #2483 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
blocks/editable/index.js 11.02% <0%> (-0.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5125ee1...80bbab5. Read the comment docs.

@tg-ephox
Copy link
Contributor Author

@youknowriad at the moment you need to right arrow after the link to escape it

@tg-ephox tg-ephox merged commit ccf991a into master Aug 21, 2017
@tg-ephox tg-ephox deleted the fix/1246-add-plain-text-after-insert-link branch August 21, 2017 23:54
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.

Links: Can't add plain text after insert link at end of paragraph
2 participants