mirror of
https://github.com/facebook/lexical.git
synced 2025-05-17 06:59:17 +08:00
[lexical] Chore: Added missing isInline
function to TextNode (#7226)
Co-authored-by: Bob Ippolito <bob@redivi.com>
This commit is contained in:
@ -623,6 +623,7 @@ declare export class TextNode extends LexicalNode {
|
||||
getFormat(): number;
|
||||
getStyle(): string;
|
||||
isComposing(): boolean;
|
||||
isInline(): true;
|
||||
isToken(): boolean;
|
||||
isSegmented(): boolean;
|
||||
isDirectionless(): boolean;
|
||||
@ -698,6 +699,7 @@ declare export class LineBreakNode extends LexicalNode {
|
||||
getTextContent(): '\n';
|
||||
createDOM(): HTMLElement;
|
||||
updateDOM(): false;
|
||||
isInline(): true;
|
||||
static importJSON(
|
||||
serializedLineBreakNode: SerializedLineBreakNode,
|
||||
): LineBreakNode;
|
||||
|
@ -50,6 +50,10 @@ export class LineBreakNode extends LexicalNode {
|
||||
return false;
|
||||
}
|
||||
|
||||
isInline(): true {
|
||||
return true;
|
||||
}
|
||||
|
||||
static importDOM(): DOMConversionMap | null {
|
||||
return {
|
||||
br: (node: Node) => {
|
||||
|
@ -473,6 +473,13 @@ export class TextNode extends LexicalNode {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns true if the text node is inline, false otherwise.
|
||||
*/
|
||||
isInline(): true {
|
||||
return true;
|
||||
}
|
||||
|
||||
// View
|
||||
|
||||
createDOM(config: EditorConfig, editor?: LexicalEditor): HTMLElement {
|
||||
|
Reference in New Issue
Block a user