
Is it possible to remove the other options except the table grid for tinymce 4 table plugin? Id like to add the quicktable toolbar like the one in tinymce inlite theme
I have the following code currently
tinymce.init({
selector: 'textarea.documentWysiwyg',
plugins: "nonbreaking table",
menubar: false,
toolbar: 'undo redo | bold italic | outdent indent | table',
table_toolbar: "",
nonbreaking_force_tab: true
});
We found a workaround for this issue!
You can create a new custom MenuButton (but it can be added to the toolbar!), which uses the inserttable (so called grid).
private readonly setupCallback: (editor: Editor) => void = (editor: Editor) => {
//...
editor.ui.registry.addMenuButton('customInsertTable', {
icon: 'table',
fetch: (callback) => {
const items: any[] = [
'inserttable'
];
callback(items);
}
});
};
Add the new attribute (customInsertTable) to the toolbar.
You should end up with ->

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With