I had the following problem: currently I have a custom toolbar / set of buttons for bold / italic / underline, and when each of them is pressed, I call the corresponding js function. Currently, when I left-click, Iām calling
tinymce.activeEditor.formatter.toggle('bold');
The latter successfully highlights the current selection, but when I press the bold button again, the bold font is NOT deleted. I tried to debug it and
formatter.remove()
the method is called, and when I check that the current selection is in its body, the result is correct (there is a choice, and the one that is highlighted in bold). If I reselect the text and press the bold button, the bold formatting is deleted. I wonder what the problem is? Any help is appreciated.
thanks
source share