Module: lexical
Classes
- DecoratorNode
 - EditorState
 - ElementNode
 - LexicalEditor
 - LexicalNode
 - LineBreakNode
 - NodeSelection
 - ParagraphNode
 - Point
 - RangeSelection
 - RootNode
 - TabNode
 - TextNode
 
Interfaces
Type Aliases
CommandListener
Ƭ CommandListener<P>: (payload: P, editor: LexicalEditor) => boolean
Type parameters
| Name | 
|---|
P | 
Type declaration
▸ (payload, editor): boolean
Parameters
| Name | Type | 
|---|---|
payload | P | 
editor | LexicalEditor | 
Returns
boolean
Defined in
lexical/src/LexicalEditor.ts:241
CommandListenerPriority
Ƭ CommandListenerPriority: 0 | 1 | 2 | 3 | 4
Defined in
lexical/src/LexicalEditor.ts:245
CommandPayloadType
Ƭ CommandPayloadType<TCommand>: TCommand extends LexicalCommand<infer TPayload> ? TPayload : never
Type helper for extracting the payload type from a command.
Example
const MY_COMMAND = createCommand<SomeType>();
// ...
editor.registerCommand(MY_COMMAND, payload => {
  // Type of `payload` is inferred here. But lets say we want to extract a function to delegate to
  handleMyCommand(editor, payload);
  return true;
});
function handleMyCommand(editor: LexicalEditor, payload: CommandPayloadType<typeof MY_COMMAND>) {
  // `payload` is of type `SomeType`, extracted from the command.
}
Type parameters
| Name | Type | 
|---|---|
TCommand | extends LexicalCommand<unknown> | 
Defined in
lexical/src/LexicalEditor.ts:278
CreateEditorArgs
Ƭ CreateEditorArgs: Object
Type declaration
| Name | Type | 
|---|---|
disableEvents? | boolean | 
editable? | boolean | 
editorState? | EditorState | 
html? | HTMLConfig | 
namespace? | string | 
nodes? | ReadonlyArray<Klass<LexicalNode> | LexicalNodeReplacement> | 
onError? | ErrorHandler | 
parentEditor? | LexicalEditor | 
theme? | EditorThemeClasses | 
Defined in
lexical/src/LexicalEditor.ts:177
DOMChildConversion
Ƭ DOMChildConversion: (lexicalNode: LexicalNode, parentLexicalNode: LexicalNode | null | undefined) => LexicalNode | null | undefined