This sample shows how to configure CKEditor instances to use the
textselection (textselection) plugin that makes the editor keep it's text-selection when switching between WYSIWYG and Source mode, and scrolls the selection into the viewport.
To add a CKEditor instance using the textselection plugin, insert the following JavaScript call to your code:
CKEDITOR.replace( 'textarea_id', {
extraPlugins: 'textselection',
});
Note that textarea_id in the code above is the id attribute of
the <textarea> element to be replaced with CKEditor.