pub struct InitialEditorConfig {
pub namespace: Option<String>,
pub nodes: Vec<NodeClass>,
pub editable: Option<bool>,
pub on_warn: Option<Rc<dyn Fn(LexicalError, &Editor) -> Result<(), LexicalError>>>,
pub theme: Option<Object>,
pub parent_editor: Option<Editor>,
pub initial_editor_state: Option<InitialEditorStateType>,
pub html: HtmlConfig,
pub dom: Option<EditorDomRenderConfig>,
}Expand description
InitialEditorConfig: the editor configuration an extension contributes,
and what init may change. Of JS’s fields, the ones the port has:
namespace, the node classes and replacements, $initialEditorState,
theme, parentEditor, editable, onWarn, and (with the html
feature) html and dom. disableEvents has no counterpart (the app
dispatches the events it has), nor has onError (an update’s error is
returned from Editor::update).
Fields§
§namespace: Option<String>namespace; None is JS’s undefined, for which the editor takes
its parent editor’s, or a random one.
nodes: Vec<NodeClass>nodes.
editable: Option<bool>editable; None is JS’s undefined.
on_warn: Option<Rc<dyn Fn(LexicalError, &Editor) -> Result<(), LexicalError>>>onWarn.
theme: Option<Object>theme: the extensions’ themes merged (deepThemeMergeInPlace);
None (JS’s undefined) when that is empty.
parent_editor: Option<Editor>parentEditor: the editor the new one is nested in.
initial_editor_state: Option<InitialEditorStateType>$initialEditorState; None is JS’s undefined.
html: HtmlConfightml: the extensions’ export overrides and import conversions.
dom: Option<EditorDomRenderConfig>dom: the render config, which only init sets (as
DOMRenderExtension does); None for the default.