You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Team, Does anyone know how to implement auto closing brackets in grapjs editor with proper cursor position.
I'm actually looking to implement solutions for this exact problem in grapeJs editor. window.getSelection() is always empty in my case.
This is what I'm trying to do so far.
editor.on('component:selected', (model) => { model.getEl().addEventListner("keypress", (e) => { //here I'm trying to add the solution suggested in the above //stackoverflow link to add closing brackets and update cursor positon. }) })
Please share any code or thoughts on how to implement this. Thanks in advance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team, Does anyone know how to implement auto closing brackets in grapjs editor with proper cursor position.
I'm actually looking to implement solutions for this exact problem in grapeJs editor.
window.getSelection()
is always empty in my case.This is what I'm trying to do so far.
editor.on('component:selected', (model) => { model.getEl().addEventListner("keypress", (e) => { //here I'm trying to add the solution suggested in the above //stackoverflow link to add closing brackets and update cursor positon. }) })
Please share any code or thoughts on how to implement this. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions