icon: 'diagram',
onAction() {
editor.execCommand('drawio');
+ // Hack to de-focus the tinymce editor toolbar
+ window.document.body.dispatchEvent(new Event('mousedown', {bubbles: true}));
},
fetch(callback) {
callback([
if (!drawings.length) return;
editor.undoManager.transact(function () {
- drawings.each((index, elem) => {
- elem.setAttribute('contenteditable', 'false');
- });
+ for (const drawing of drawings) {
+ drawing.setAttribute('contenteditable', 'false');
+ }
});
});