-
I am trying to add analytics on how users use the lexical editor. I would like to monitor text format changes (bold, italic, ...). I found https://lexical.dev/docs/concepts/listeners#registerupdatelistener, but this listener does not should the diff. I also thought to use the following: editor.registerCommand(FORMAT_TEXT_COMMAND, (payload) => analytics.track(...), COMMAND_PRIORITY_LOW); but I should add a register with this callback for every Lexical Command. Maybe there should be a listener for every command executed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Why there are commands for list insertion |
Beta Was this translation helpful? Give feedback.
@thegreatercurve
Why there are commands for list insertion
INSERT_UNORDERED_LIST_COMMAND
, ...but no commands for inserting headings, or paragraphs?
Maybe it makes sense to also add these commands and use them instead of
$createHeadingNode(heading)
?