You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that insertHTML is working with the last cursor position. So if you don't focus the editor, last position of cursor is undefined and insertHTML will not work until you focus the editor. By the way i believe there is focus method that you can focus the editor then use insertHTML method. Docs
I'm trying to use the function: insertHTML
As per manual: editor.insertHTML('', true, true);
I created a button and put a jquery
suneditor.insertHTML('Text 1', true, true);
But when clicking the button it does not add the text. But if I click on the editor and then click on the button, the text is added.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: