diff --git a/index.html b/index.html index 3d29d50..6392ccb 100644 --- a/index.html +++ b/index.html @@ -9,10 +9,10 @@
-
-
Popravite kar želite.
+
+ @@ -21,10 +21,10 @@ -
-
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite. Na mizo nisem položil knjigo.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
Popravite kar želite.
Na mizo nisem položil knjigo. Popravite kar želite.
+ + --> @@ -43,5 +43,4 @@ font-family: Arial, Helvetica, sans-serif; z-index: 2; } - - \ No newline at end of file + diff --git a/online-editor.js b/online-editor.js index 89645f6..337e2e4 100644 --- a/online-editor.js +++ b/online-editor.js @@ -11,6 +11,7 @@ class BesEditor { this.correctionPanel = correctionPanel this.scrollPanel = scrollPanel this.offsetTop = null + this.disableSpellcheck(edit) this.proof(edit) edit.addEventListener('beforeinput', e => this.handleBeforeInput(e), false) edit.addEventListener('click', e => this.handleClick(e)) @@ -26,11 +27,16 @@ class BesEditor { return editor } + // Set spellcheck to false + disableSpellcheck(edit) { + edit.spellcheck = false + } + // TODO: add support for textarea elements // Recursively grammar-proofs one node. async proof(el) { // If first child is not a block element, add a dummy
...
around it. - // This is solution is still not fully tested and might need some improvements. + // This solution is still not fully tested and might need some improvements. if (el.classList?.contains('bes-online-editor')) { const firstChild = el.firstChild if (