Files
openmaic/OpenMAIC/lib/prosemirror/selection-sync.ts
2026-08-16 14:58:47 +08:00

7 lines
254 B
TypeScript

import type { Transaction } from 'prosemirror-state';
/** Push toolbar attrs when the selection moved or marks/doc changed. */
export function shouldPushAttrs(tr: Transaction): boolean {
return tr.selectionSet || tr.docChanged || tr.storedMarksSet;
}