1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Lexical: Made summary part of details node

To provide more control of the summary as part of details.
To support, added a way to ignore elements during import DOM, allowing
up to read summaries when parsing details without duplicate nodes
involved.
This commit is contained in:
Dan Brown
2024-12-15 17:11:02 +00:00
parent 2f119d3033
commit 3f86937f74
4 changed files with 54 additions and 60 deletions

View File

@ -142,10 +142,15 @@ export type DOMConversionMap<T extends HTMLElement = HTMLElement> = Record<
>;
type NodeName = string;
/**
* Output for a DOM conversion.
* Node can be set to 'ignore' to ignore the conversion and handling of the DOMNode
* including all its children.
*/
export type DOMConversionOutput = {
after?: (childLexicalNodes: Array<LexicalNode>) => Array<LexicalNode>;
forChild?: DOMChildConversion;
node: null | LexicalNode | Array<LexicalNode>;
node: null | LexicalNode | Array<LexicalNode> | 'ignore';
};
export type DOMExportOutputMap = Map<