How to get / maintain current cursor position in ck-editor 4?
0
I am using the inline text Ck-editor and on every key-Up I need to validate the text (if the limit is exceeded) and if the user is not on the end of the text (maybe typing in between text), I need to remove the last word from the current instance of ck-editor Now the issue is, I have managed to remove the last word of the text and pushing it to another editor, but can't maintain the current position for the cursor. (after removing the last word, it jumps back to the first position.) Following is a snap of my code. var firstEditor = CKEDITOR.instances['inlineOne']; var selection = firstEditor.getSelection(); var bookmarks = selection.createBookmarks(true); var range = editor.createRange(); ... code to remove the last word "newTextVal" has the HTML after removeing last word....