@atlaskit/editor-plugin-tasks-and-decisions
Version:
Tasks and decisions plugin for @atlaskit/editor-core
29 lines (28 loc) • 1.21 kB
TypeScript
import type { IntlShape } from 'react-intl';
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
/**
* Wrapper for ADF taskItem node spec to augment toDOM implementation
* with fallback UI for lazy node view rendering / window virtualization
* @nodeSpecException:toDOM patch
* @returns
* @example
*/
export declare const taskItemNodeSpec: () => NodeSpec;
/**
* Wrapper for ADF blockTaskItem node spec to augment toDOM implementation
* with fallback UI for lazy node view rendering / window virtualization
* @nodeSpecException:toDOM patch
* @returns
* @example
*/
export declare const blockTaskItemNodeSpec: () => NodeSpec;
/**
* Converts a task item node to a DOM output specification.
* This is used for rendering the task item in the editor.
*
* @param {Node} node - The ProseMirror node representing the task item.
* @param {string} placeholder - The placeholder text to display when the task item is empty.
* @returns A DOMOutputSpec representing the task item.
*/
export declare function taskItemToDom(node: PMNode, placeholder: string, intl: IntlShape): DOMOutputSpec;
export declare const lazyTaskItemToDom: (node: PMNode) => DOMOutputSpec;