I'm using CKEditor 4, and when I'm in the middle of some long content and switch from the standard editor view over to the Source view (or vice versa), it jumps me back to the top of the content. However, I want to make it so that it stays where I was in the view I just came from.
How can I do this in CKEditor 4? I've tried Googling the answer, but I can't seem to find any relevant hits for either a setting in CKEditor 4 to do this or a snippet of JS that would accomplish the same thing. Thank you.
There's a plugin for this called "Keep TextSelection". Download it here: https://ckeditor.com/cke4/addon/textselection
Extract and upload the textselection folder to the plugins folder. Next add this to the config.js file:
CKEDITOR.editorConfig = function( config ) {
// along with any other config lines add the following
config.extraPlugins = 'textselection';
}
From the WYSIWYG editor press the Source button. Your cursor will be at the same place in the Source view. If you highlight something that same text will be highlighted in Soure view.
Here's a working example: http://jsfiddle.net/sirtet/TX5bc/