Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
FIX: Empty Links shows on frontend #2302
Changed the Toolbar to only create a link when the URL has been entered, instead of creating the link up front and then setting the URL.
I needed to lift the state for the link functionality from
A remaining issue is that when typing into
Fixes #1069 (I put this in the same PR as its right in the same area)
Added CSS class and custom selector to TinyMCE so when the Toolbar is used, it doesn't loose focus. Also before applying formatting, focus the TinyMCE instance. This meant that the bookmark was no longer needed in state.
@@ Coverage Diff @@ ## master #2302 +/- ## ========================================= + Coverage 25.9% 25.9% +<.01% ========================================= Files 157 157 Lines 4849 4848 -1 Branches 820 817 -3 ========================================= Hits 1256 1256 - Misses 3033 3035 +2 + Partials 560 557 -3
This works great, but I think we should still keep the local state in the
FormatToolbar. A state that is not used in a component but just passed as a prop to the child component should leave in the child component, don't you think?
Can you explain why this is necessary? I'm a bit reluctant about this change for a few reasons:
@aduth @youknowriad I removed the CSS class and selector, I was recommended to try this in order that the editor keeps its selection but it seems that focussing the editor before applying/removing formatting fixes this anyway. Have also moved the