fred icon indicating copy to clipboard operation
fred copied to clipboard

[Question] RTE Config: Add custom button

Open robcarey opened this issue 6 years ago • 0 comments

Is there a way or a plan to allow for some of the more advanced TinyMCE config options that require JS? Looking to add a custom menu and/or buttons to insert pre-fab custom code blocks into rich text editable areas. i.e. Allowing customer to select Bootstrap buttons to insert inline. I know I can add a button element, but there are definitely times when inserting inline into a rich text block is preferred.

Custom button for example requires this config which doesn't play nice with JSON:

setup: function (editor) { editor.addButton('mybutton', { text: 'My button', icon: false, onclick: function () { editor.insertContent('&nbsp;<b>It\'s my button!</b>&nbsp;'); } }); }

TinyMCE custom button example : https://www.tiny.cloud/docs-4x/demo/custom-toolbar-button/

robcarey avatar Feb 12 '20 02:02 robcarey