pradeepc
8 years agoGuide
How to configure the tinymice editor buttons?
This article: https://community.lithium.com/t5/General-system-setup/Configure-which-buttons-appear-in-the-message-editor/ta-p/218926 says, we can configure the tiny mice editor buttons but not sure h...
- 8 years ago
him_varma So I accomplished this by moderately hack way
tinymce.on('AddEditor', function(e){ e.editor.on('init', function(){ tinymce.ui.Factory.create({ type: 'button', icon: 'codesample' }).on('click', function(){ // button pressing logic e.editor.selection.setContent('<code>' + e.editor.selection.getContent() + '</code>'); }) .renderTo($(e.editor.editorContainer).find('.mce-container-body .mce-toolbar:last .mce-btn-group > div')[0]) }); });