jquery - How to set tinymce content dynamically - Stack Overflow

PHOTO EMBED

Sat Sep 04 2021 10:25:31 GMT+0000 (Coordinated Universal Time)

Saved by @huttyman

// Sets the HTML contents of the activeEditor editor
tinymce.activeEditor.setContent('<span>some</span> html');

// Sets the raw contents of the activeEditor editor
tinymce.activeEditor.setContent('<span>some</span> html', {format: 'raw'});

// Sets the content of a specific editor (my_editor in this example)
tinymce.get('my_editor').setContent(data);

// Sets the bbcode contents of the activeEditor editor if the bbcode plugin was added
tinymce.activeEditor.setContent('[b]some[/b] html', {format: 'bbcode'});
content_copyCOPY

https://stackoverflow.com/questions/44299660/how-to-set-tinymce-content-dynamically