I have set the contenteditable property to false when I render it and I am trying to focus this element by calling .focus() on it, but it doesn’t work.
Based on my research, the focus is controlled internaly in the library by checking the contenteditable property and it cannot be overwritten from the parent, but I have no straight answer from your documentation.
Is that true?
My team once had a need for an editor that could be disabled but still allowed the user to make selections, and we used a plugin with filterTransaction to prevent edits. The code below isn’t complete, but you get the idea:
new Plugin({
filterTransaction(tr, state) {
if (this.getState(state).isEditable) {
return true;
}
return !tr.docChanged;
}
});