Reference a Custom Property Editor by Editor Attribute
A component property can reference a custom property editor directly through the editor attribute. The editor attribute is a reference to a custom property editor by a fullyQualifiedName string. This option is best if you want only to override the default user experience, without needing the additional validations of a custom property type.
In the Custom Article component example in the sample components, you specify an editor reference to the custom alignmentCPE for the textAlignment property.
1<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="customArticle">
2 <masterLabel>Custom Article</masterLabel>
3 <apiVersion>66.0</apiVersion>
4 <targets>
5 <target>lightningCommunity__Page</target>
6 <target>lightningCommunity__Default</target>
7 </targets>
8 <targetConfigs>
9 <targetConfig targets="lightningCommunity__Default">
10 <property name="textAlignment" type="String" editor="c/alignmentCPE" label="Text Alignment"/>
11 </targetConfig>
12 </targetConfigs>
13</LightningComponentBundle>
Don’t use the editor attribute for a property if the property’s type attribute references a custom LightningTypeBundle. Instead, specify the editor component as a component override in the editor.json file of the custom LightningTypeBundle. See Lightning Type UI Configuration for details.
See Also
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.