Added linebreak node

This commit is contained in:
DrMint 2024-03-10 21:31:34 +01:00
parent 8bd48f2434
commit f007560f4d
1 changed files with 7 additions and 0 deletions

View File

@ -147,6 +147,10 @@ export interface RichTextListCheckNode extends RichTextListNode {
listType: "check"; listType: "check";
} }
export interface RichTextLinebreakNode extends RichTextNode {
type: "linebreak";
}
export interface RichTextTextNode extends RichTextNode { export interface RichTextTextNode extends RichTextNode {
type: "text"; type: "text";
format: number; format: number;
@ -218,6 +222,9 @@ export const isListNodeBulletListNode = (node: RichTextListNode): node is RichTe
export const isListNodeCheckListNode = (node: RichTextListNode): node is RichTextListCheckNode => export const isListNodeCheckListNode = (node: RichTextListNode): node is RichTextListCheckNode =>
node.listType === "check"; node.listType === "check";
export const isNodeLinebreakNode = (node: RichTextNode): node is RichTextLinebreakNode =>
node.type === "linebreak";
export const isNodeTextNode = (node: RichTextNode): node is RichTextTextNode => export const isNodeTextNode = (node: RichTextNode): node is RichTextTextNode =>
node.type === "text"; node.type === "text";