Function: configExtension()
configExtension<
Config
,Name
,Output
,Init
>(...args
):NormalizedLexicalExtensionArgument
<Config
,Name
,Output
,Init
>
Override a partial of the configuration of an Extension, to be used in the dependencies array of another extension, or as an argument to buildEditorFromExtensions.
Before building the editor, configurations will be merged using extension.mergeConfig(extension, config) or shallowMergeConfig if this is not directly implemented by the Extension.
Type Parameters
• Config extends ExtensionConfigBase
• Name extends string
• Output
• Init
Parameters
• ...args: NormalizedLexicalExtensionArgument
<Config
, Name
, Output
, Init
>
An extension followed by one or more config partials for that extension
Returns
NormalizedLexicalExtensionArgument
<Config
, Name
, Output
, Init
>
[extension, config, ...configs]
Example
export const ReactDecoratorExtension = defineExtension({
name: "react-decorator",
dependencies: [
configExtension(ReactExtension, {
decorators: [<ReactDecorator />]
}),
],
});