问题
I've a custom toolbar button, which is used to toggle the browser's spell check. I've used
browser_spellcheck : true
in the initialization. Now if we press button, then i need to 'off' the spell check.
So, how can we set browser_spellcheck
to false
dynamically?
回答1:
You cannot change the init settings of TinyMCE dynamically - it simply does not allow that to happen. If you need to change a setting like this you would need to use the remove()
and init()
APIs to reload the editor with new settings.
来源:https://stackoverflow.com/questions/51320654/how-to-toggle-browser-spellcheck-dynamically-in-tinymce