diff --git a/index.html b/index.html index fb6a08e..0118fe5 100644 --- a/index.html +++ b/index.html @@ -9,15 +9,15 @@ - - + +
-
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
+
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
diff --git a/online-editor.js b/online-editor.js index 4323265..269eafd 100644 --- a/online-editor.js +++ b/online-editor.js @@ -298,18 +298,16 @@ window.onload = () => { // Search and prepare all our editors found in the document. document.querySelectorAll('.bes-online-editor').forEach(edit => { let editor = new BesEditor(edit) - besEditors[edit.id] = editor + besEditors.push(editor) }) } window.onresize = () => { - Object.keys(besEditors).forEach(key => { - let editor = besEditors[key] + besEditors.forEach(editor => { editor.children.forEach(child => { - editor.clearAllMistakes(child?.elements) + editor.clearAllMistakes(child.elements) child.matches.forEach(match => { - const clientRect = BesEditor.addMistake(match.range, match) - match.rects = clientRect + match.rects = BesEditor.addMistake(match.range, match) }) }) })