coreSystem variable
Add the the core system when creating systemf for your own plugins. This gives you access to the component core state and logic, like the visitors, the lexical nodes, and the publishers used to insert nodes in the editor.
Signature:
coreSystem: SystemSpec<[], (r: Realm) => {
activeEditor: RealmNode<LexicalEditor | null>;
inFocus: RealmNode<boolean>;
historyState: RealmNode<HistoryState>;
currentSelection: RealmNode<RangeSelection | null>;
jsxIsAvailable: RealmNode<boolean>;
jsxComponentDescriptors: RealmNode<JsxComponentDescriptor[]>;
initialRootEditorState: RealmNode<InitialEditorStateType>;
rootEditor: RealmNode<LexicalEditor | null>;
createRootEditorSubscription: RealmNode<EditorSubscription>;
createActiveEditorSubscription: RealmNode<EditorSubscription>;
importVisitors: RealmNode<MdastImportVisitor<Mdast.Content>[]>;
syntaxExtensions: RealmNode<Extension[]>;
mdastExtensions: RealmNode<(Partial<Config> | Partial<Config>[])[] | null | undefined>;
usedLexicalNodes: RealmNode<Klass<LexicalNode>[]>;
addImportVisitor: RealmNode<MdastImportVisitor<Mdast.Content>>;
addLexicalNode: RealmNode<Klass<LexicalNode>>;
addSyntaxExtension: RealmNode<Extension>;
addMdastExtension: RealmNode<Partial<Config> | Partial<Config>[]>;
toMarkdownExtensions: RealmNode<Options[]>;
toMarkdownOptions: RealmNode<Options>;
addToMarkdownExtension: RealmNode<Options>;
addExportVisitor: RealmNode<LexicalVisitor>;
exportVisitors: RealmNode<LexicalVisitor[]>;
initialMarkdown: RealmNode<string>;
setMarkdown: RealmNode<string>;
markdown: RealmNode<string>;
markdownSignal: RealmNode<string>;
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
contentEditableClassName: RealmNode<string>;
placeholder: RealmNode<React.ReactNode>;
autoFocus: RealmNode<boolean | {
defaultSelection?: "rootStart" | "rootEnd" | undefined;
preventScroll?: boolean | undefined;
}>;
readOnly: RealmNode<boolean>;
composerChildren: RealmNode<React.ComponentType<{}>[]>;
addComposerChild: RealmNode<React.ComponentType<{}>>;
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
addTopAreaChild: RealmNode<React.ComponentType<{}>>;
nestedEditorChildren: RealmNode<React.ComponentType<{}>[]>;
addNestedEditorChild: RealmNode<React.ComponentType<{}>>;
editorWrappers: RealmNode<React.ComponentType<{
children: React.ReactNode;
}>[]>;
addEditorWrapper: RealmNode<React.ComponentType<{
children: React.ReactNode;
}>>;
currentFormat: RealmNode<number>;
editorInFocus: RealmNode<EditorInFocus | null>;
applyFormat: RealmNode<TextFormatType>;
currentBlockType: RealmNode<BlockType>;
applyBlockType: RealmNode<BlockType>;
convertSelectionToNode: RealmNode<() => ElementNode>;
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
onBlur: RealmNode<FocusEvent>;
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
markdownProcessingError: RealmNode<{
error: string;
source: string;
} | null>;
markdownErrorSignal: RealmNode<{
error: string;
source: string;
}>;
}>