Is there any way to postion the blocks ? #1890
Replies: 3 comments
-
And what's the problem? |
Beta Was this translation helpful? Give feedback.
-
What I did (assuming the editor id is 'editorjs') to postion the the block pos indexed n=pos-1 as the first block is 0: //we get the redactor's dom holding the blocks more universally than document.getElementsByClassName("codex-editor__redactor");) //Hook as editor.caret.setToBlock('start', index);editor.caret.focus() does not work However I am stuck too to add a mouseover handler, there is already a click event registered in ui.ts so I guess it is not possible to add one from outside. var redactor=document.getElementsByClassName("codex-editor__redactor"); |
Beta Was this translation helpful? Give feedback.
-
Update that works to retrieve the index of the block clicked..I did not know the difference between HTMLCollection live nodes and static NodeList.. This fix the error previously works for mouseover also. function getRedactor() {
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm foreach the data form the save( ).and create a list depend on this data.text . now i want to add a click event on this list's item,
it can link to the editor's blocks and focus the block of i clicked .
is there any way to get it ?
Beta Was this translation helpful? Give feedback.
All reactions