Function: getExtensionDependencyFromEditor()
getExtensionDependencyFromEditor<
Extension
>(editor
,extension
):LexicalExtensionDependency
<Extension
>
Get the finalized config and output of an Extension that was used to build the editor.
This is useful in the implementation of a LexicalNode or in other situations where you have an editor reference but it's not easy to pass the config or ExtensionRegisterState around.
It will throw if the Editor was not built using this Extension.
Type Parameters
• Extension extends AnyLexicalExtension
Parameters
• editor: LexicalEditor
The editor that was built using extension
• extension: Extension
The concrete reference to an Extension used to build this editor
Returns
LexicalExtensionDependency
<Extension
>
The config and output for that Extension