Minor code revision
This commit is contained in:
parent
4d29dfa06e
commit
887741f061
@ -15,6 +15,7 @@
|
||||
<div id="ed4" class="online-editor" contenteditable="true"><div>Popravite <a href=".">kar želite</a>.</div><div>Na mizo nisem položil knjigo. Popravite kar želite.</div></div>
|
||||
<div id="ed5" class="online-editor" contenteditable="true">To je preiskus.</div>-->
|
||||
<!-- <div id="ed6" class="online-editor" contenteditable="true"><div class="contextual"><p>Madžarski premier Orban je tako očitno vendarle pristal na nadaljnjo makrofinančno pomoč Ukrajini v okviru revizije dolgoročnega proračuna unije 2021-2027. Ta vključuje 50 milijard evrov za Ukrajino za prihodnja štiri leta, od tega 33 milijard evrov posojil in 17 milijard evrov nepovratnih sredstev.</p></div></div> -->
|
||||
<!-- TODO: Insert correction-panel in DOM with JavaScript and include editor ID in its ID to support multiple editors. -->
|
||||
<div id="correction-panel"></div>
|
||||
<div id="ed7" class="online-editor" contenteditable="true"><div>Popravite kar želite.</div><div>Na mizo nisem položil knjigo. Popravite kar želite.</div></div>
|
||||
<my-component></my-component>
|
||||
|
@ -10,8 +10,9 @@ window.onload = () => {
|
||||
}
|
||||
besEditors[edit.id] = editor
|
||||
besProof(edit)
|
||||
edit.addEventListener('beforeinput', e => besBeforeInput(edit.id, e), false)
|
||||
edit.addEventListener('beforeinput', e => besHandleBeforeInput(edit.id, e), false)
|
||||
edit.addEventListener('click', e => besHandleClick(e))
|
||||
// TODO: Handle editor resizes.
|
||||
})
|
||||
}
|
||||
|
||||
@ -102,7 +103,7 @@ async function besProof(el)
|
||||
}
|
||||
|
||||
// Marks section of text that is about to change as not-yet-grammar-proofed.
|
||||
function besBeforeInput(editorId, event)
|
||||
function besHandleBeforeInput(editorId, event)
|
||||
{
|
||||
let editor = besEditors[editorId]
|
||||
if (editor.timer) clearTimeout(editor.timer)
|
||||
|
@ -1,4 +1,7 @@
|
||||
/* Besana online editor */
|
||||
|
||||
/* TODO: Rename classes to "bes-..." */
|
||||
|
||||
.online-editor {
|
||||
width: 80%;
|
||||
height: 300px;
|
||||
@ -20,7 +23,7 @@
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
cursor: text;
|
||||
/* pointer-events: none; */
|
||||
pointer-events: none;
|
||||
/* text-decoration: underline;
|
||||
text-decoration-color: red;
|
||||
cursor: text; */
|
||||
|
Loading…
x
Reference in New Issue
Block a user