Files
outline/shared/editor/commands
Tom MoorandClaude 5ff3020318 fix: Crash when two mermaid diagrams are adjacent (#13173)
* fix: Crash when two mermaid diagrams are adjacent

A diagram's widget decoration sits at the end of its code block, which is
also the start position of the following block. When the next block is also
a mermaid diagram and has no decoration of its own yet, it adopted the
preceding diagram's renderer — and so its single DOM element — leaving two
widget decorations sharing one node and crashing prosemirror-view.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Enter with mermaid selection deletes node

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-28 08:58:01 -04:00
..

https://prosemirror.net/docs/ref/#commands

Commands are building block functions that encapsulate an editing action. A command function takes an editor state, optionally a dispatch function that it can use to dispatch a transaction and optionally an EditorView instance. It should return a boolean that indicates whether it could perform any action.

Additional commands that are not included as part of prosemirror-commands, but are often reused can be found in this folder.