-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Thanks for this plugin.
The readme says:
Supported on tinyMCE versions v5, v6 and v7.
When functioning in the normal (Custom View) mode the plugin attempts to use the data-mce-name attribute for proper functioning of the toolbar.
supercode-tinymce-plugin/supercode/plugin.js
Lines 350 to 366 in a692a27
| newHeader.querySelectorAll('.tox-tbtn, .tox-split-button').forEach((btn) => { | |
| if(btn.getAttribute('data-mce-name') != 'supercode'){ | |
| // remove overflow button to make space for code button | |
| if(btn.getAttribute('data-mce-name') === 'overflow-button'){ | |
| overflowButton = btn; | |
| } | |
| btn.classList.remove('tox-tbtn--enabled'); | |
| btn.classList.add('tox-tbtn--disabled'); | |
| btn.removeAttribute('data-mce-name'); | |
| } | |
| else{ | |
| isPluginButton = true; | |
| btn.setAttribute('data-mce-name', 'supercode-toggle') | |
| btn.classList.add('tox-tbtn--enabled'); | |
| btn.onclick = onSaveHandler; | |
| } | |
| }); |
But this attribute doesn't appear to be present on toolbar buttons in TinyMCE 6. One effect of this is that all toolbar buttons become disabled in code view and the supercode toolbar button can't be used to exit code view.
Metadata
Metadata
Assignees
Labels
No labels
