Currently I am developing a plugin for TinyMce 4's editor. In this plugin I need to know whether the cursor is located in/around a word.
The best way to determine this would be to check both the character before and after the cursor. If both are either empty or whitespace then the cursor is not contained in a word.
However now how do I translate this to code? The editor.selection
is probably the way to go (http://www.tinymce.com/wiki.php/api4:class.tinymce.dom.Selection) but I have no clue as to how I can accomplish this. I was not able to find any examples.