Please click on the link to view the UX I am trying to achieve
I need some direction on how do I go about achieving the above. The idea is to show the plus icon next to cursor and user can easily click on it and insert items of their choice. I feel it's a great UX!
Any help is highly appreciated!
You can use the
.setContent()
method to programmatically add content to the editor: https://www.tiny.cloud/docs/api/tinymce.dom/tinymce.dom.selection/#setcontent https://www.tiny.cloud/docs/api/tinymce/tinymce.editor/#setcontentHere is a Tiny Fiddle demonstration: http://fiddle.tinymce.com/5vhaab
In that Fiddle, I have also disabled the
menubar
andtoolbar
by setting them tofalse
. https://www.tiny.cloud/docs/configure/editor-appearance/#menubar https://www.tiny.cloud/docs/configure/editor-appearance/#toolbarAdditionally, you can programmatically trigger other editor commands from outside of the editor itself using the
.execCommand()
method: https://www.tiny.cloud/docs/api/tinymce/tinymce.editorcommands/#execcommandHere is a list of available commands: https://www.tiny.cloud/docs/advanced/editor-command-identifiers/