Skip to content

Weird text selecting issue #5517

Answered by glaprida
glaprida asked this question in Q&A
Nov 13, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

This was my solution:

editor.on('component:selected', (c)=>{
 
        if(editor.getSelected()!=undefined && editor.getEditing()!=undefined){
            if(editor.getSelected().cid != editor.getEditing().cid){
                setTimeout(()=>{ // you might not need the timeout. in my case it was required for other plugin to work right
                    editor.select(editor.getEditing())
                },1)
            }
        }
});

It basically re-select the element that's being edited.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@artf
Comment options

artf Jul 2, 2024
Maintainer

Answer selected by glaprida
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants