]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/plugin-drawio.js
Added language list favourites sorting, updated styles
[bookstack] / resources / js / wysiwyg / plugin-drawio.js
index 6b0167a7045e56fc124a54f450b47a7c68d120ee..7d679d539231ab822db3055ccfcb74cdc590f031 100644 (file)
@@ -131,13 +131,13 @@ export function getPlugin(providedOptions) {
         });
 
         editor.on('SetContent', function () {
-            const drawings = editor.$('body > div[drawio-diagram]');
+            const drawings = editor.dom.select('body > div[drawio-diagram]');
             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');
+                }
             });
         });