Ability to toggle a mark when typing into a marked node #5606
Replies: 1 comment
-
Just an update - I was able to solve this problem. by using the onUpdate event handler rather than using the handleDOMEvents. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi team,
I have a requirement that I can't find a solution for. Basically users can add marks to the document (for the sake of simplicity - let's say they mark some text as 'Bold'). If the user types WITHIN that mark, then the next character should not contain the mark, e.g.:
After applying mark:
THIS IS BOLD
After putting cursor between IS and BOLD and typing next value:
THIS IS NOT BOLD
I've gotten this to work by adding some code to manipulate the DOM, i.e.:
This works great so long as I switch off Collaboration. It doesn't work if I turn on Collaboration (presumably because DOM event manipulation won't sync to Collaboration server which makes sense).
Can anyone advise of an alternative way to do this so that is works with Collaboration as well?
Beta Was this translation helpful? Give feedback.
All reactions