Closed emad-elsaid closed 1 year ago
Does this fix the problem with creating shortcuts for underline as well?
This works so well! Thank you @emad-elsaid
Does this fix the problem with creating shortcuts for underline as well?
You can fix this by simply adding
static get shortcut() {
return 'CMD+U'; // <-- key binding of your preference
}
to the above-mentioned class.
I noticed the bold tool that comes with the core editor uses execCommand and plugins are using another method. there is a problem with the approach that prevent user from applying the tool to a sentence then tries to remove one word of this sentence.
The issue is that it tried to get the tags around the text which will remove the whole tag and replace the sentence with just the text that was highlighted/selected.
Anyway I ended up reimplementing this tool using execCommand
I used the same approach to implement strikethrough too