]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/lexical/core/LexicalNode.ts
Lexical: Fixed code in lists, removed extra old alignment code
[bookstack] / resources / js / wysiwyg / lexical / core / LexicalNode.ts
index 163bb8c31c85119a59802db6fb5933ce4b1d8f55..7306e6bca2755a578826f4bf87f37d24935ed465 100644 (file)
@@ -146,6 +146,12 @@ 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.
+ *
+ * You can specify a function to run for each converted child (forChild) or on all
+ * the child nodes after the conversion is complete (after).
+ * The key difference here is that forChild runs for every deeply nested child node
+ * of the current node, whereas after will run only once after the
+ * transformation of the node and all its children is complete.
  */
 export type DOMConversionOutput = {
   after?: (childLexicalNodes: Array<LexicalNode>) => Array<LexicalNode>;