UNPKG

@atlaskit/editor-plugin-show-diff

Version:

ShowDiff plugin for @atlaskit/editor-core

15 lines (14 loc) • 746 B
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; /** Where to look up a mark's renderer, and the view to render it against. */ export type MarkViewSources = { nodeViews?: Record<string, NodeViewConstructor>; view?: EditorView; }; /** * Wraps rendered DOM in its marks, as ProseMirror does for the live document. Without this a * block node loses `breakout`, whose wrapper supplies the width. Marks nest * outside-in, so `marks[0]` is outermost. */ export declare const wrapInMarkViews: (targetNode: PMNode, nodeDom: Node, sources: MarkViewSources) => Node;