Skip to main content

Function: configPlan()

configPlan<Config, Name, Output, Init>(...args): NormalizedLexicalPlanArgument<Config, Name, Output, Init>

Override a partial of the configuration of a Plan, to be used in the dependencies array of another plan, or as an argument to buildEditorFromPlans.

Before building the editor, configurations will be merged using plan.mergeConfig(plan, config) or shallowMergeConfig if this is not directly implemented by the Plan.

Type Parameters

Config extends PlanConfigBase

Name extends string

Output

Init

Parameters

• ...args: NormalizedLexicalPlanArgument<Config, Name, Output, Init>

A plan followed by one or more config partials for that plan

Returns

NormalizedLexicalPlanArgument<Config, Name, Output, Init>

[plan, config, ...configs]

Example

export const ReactDecoratorPlan = definePlan({
name: "react-decorator",
dependencies: [
configPlan(ReactPlan, {
decorators: [<ReactDecorator />]
}),
],
});

Defined in

lexical-builder-core/dist/definePlan.d.ts:59