You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to disable links button of the CKEditor when editing buttons (mj-button exactly).
I added this peace of code:
const focus = (el: HTMLElement, rte?: CKE.editor) => {
if (rte?.focusManager?.hasFocus) return;
el.contentEditable = 'true';
//START OF NEW
let mjElement = findType(el); // search data gjsType of parent element
if (rte && mjElement == 'mj-button') {
rte.config.removePlugins = "link";
console.log(rte.config);
}
//END OF NEW
rte?.focus();
updateEditorToolbars();
};
When I use npm serve it works, and when editing mj-buttons with Grappe and MJML the link buttons disapear.
Then I generate the js with npm build and put it inside my app it does'nt work. No error on console and the link buttons always appearing. I have left some console.log to be sure that the new version was used.
Any idea what could be happening?
Just in case it's important, this is our ckeditor configuration:
With no CKEditor config, the code does the trick and the link button disapears.
But when using "removePlugins" in CKEditor config it stops working. I think that my idea is good (remove plugin on mj-button), but this is not the place.
In the meantime I can use this, even if it's not the best
Hello,
I want to disable links button of the CKEditor when editing buttons (mj-button exactly).
I added this peace of code:
When I use
npm serve
it works, and when editing mj-buttons with Grappe and MJML the link buttons disapear.Then I generate the js with
npm build
and put it inside my app it does'nt work. No error on console and the link buttons always appearing. I have left some console.log to be sure that the new version was used.Any idea what could be happening?
Just in case it's important, this is our ckeditor configuration:
PS: Sorry if my english is not perfect, always learning a little more :)
The text was updated successfully, but these errors were encountered: