Good day to all.
Task - when loading data via ajax, you must place the received data as a quotation in the tinymce field and then move the cursor to the next line. I do this:
jsondata='<blockquote>'+jsondata+'</blockquote><p> </p>'; tinymce.execCommand('mceRemoveEditor', false, 'text-form'); tinyMCE.execCommand("mceAddEditor", false, 'text-form'); tinymce.get('text-form').setContent(jsondata); tinyMCE.execCommand("mceAddControl", false, 'text-form'); But the cursor is placed at the very beginning of the added line and does not transfer itself to the next. How to do? Tinymce version 4.2.5
document.createRange()andwindow.getSelection(). Since the editor works through adiv-contenteditableand otherwise set the position does not roll. - And