Lexical: How to make nodes uneditable

51 views Asked by At

I created my own node in Lexical and applied it some styles.

It uses the "token" mode: node.setMode("token");

I would like to disable displaying caret inside the node, just like on this image:

Lexical editor showing custom node with a caret inside

Ideally, when user clicks on the node, the caret would stay where it stays.

Here is a demo: codesandbox

0

There are 0 answers