File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
packages/richtext-lexical/src Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 1
1
import type {
2
+ SerializedLineBreakNode as _SerializedLineBreakNode ,
3
+ SerializedTextNode as _SerializedTextNode ,
2
4
SerializedEditorState ,
3
5
SerializedElementNode ,
4
6
SerializedLexicalNode ,
5
7
Spread ,
6
- TextModeType ,
7
8
} from 'lexical'
8
9
9
10
import type { SerializedQuoteNode } from './features/blockquote/feature.server.js'
@@ -39,14 +40,17 @@ export type SerializedParagraphNode<T extends SerializedLexicalNode = Serialized
39
40
export type SerializedTextNode = Spread <
40
41
{
41
42
children ?: never // required so that our typed editor state doesn't automatically add children
42
- detail : number
43
- format : number
44
- mode : TextModeType
45
- style : string
46
- text : string
47
43
type : 'text'
48
44
} ,
49
- SerializedLexicalNode
45
+ _SerializedTextNode
46
+ >
47
+
48
+ export type SerializedLineBreakNode = Spread <
49
+ {
50
+ children ?: never // required so that our typed editor state doesn't automatically add children
51
+ type : 'linebreak'
52
+ } ,
53
+ _SerializedLineBreakNode
50
54
>
51
55
52
56
type RecursiveNodes < T extends SerializedLexicalNode , Depth extends number = 4 > = Depth extends 0
@@ -60,9 +64,10 @@ export type TypedEditorState<T extends SerializedLexicalNode = SerializedLexical
60
64
61
65
export type DefaultNodeTypes =
62
66
| SerializedAutoLinkNode
63
- | SerializedBlockNode
67
+ // | SerializedBlockNode // Not included by default
64
68
| SerializedHeadingNode
65
69
| SerializedHorizontalRuleNode
70
+ | SerializedLineBreakNode
66
71
| SerializedLinkNode
67
72
| SerializedListItemNode
68
73
| SerializedListNode
You can’t perform that action at this time.
0 commit comments