Skip to content

Incompatible with TinyMCE 6 #13

Description

@Toutouwai

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.

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.

2024-12-03_111856

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions