Hi is there a way to make an attribute in the design file of a Lightning bundle a rich text editor.

The idea is the user to be able to enter rich text which is displayed as a rich text. Also there are translations and the component is used in a public community page that is why I do use my interpretation of translation. And also translation labels do not have rich text editor that is why I am not using them.

Basically I want a to make my custom version of the default Rich Content Editor component.

Design file

<design:component >

    <design:attribute name="fiText" label="Rich text in Finish" />
    <design:attribute name="svText" label="Rich text in Svenska" />


Cmp file

<aura:handler event="c:ChangeLanguageEvent" action="{!c.changeLang}" />

<aura:attribute name="fiText" type="String" />
<aura:attribute name="svText" type="String" />

<lightning:formattedRichText value="{! v.lang == 'sv' ? v.svText : v.fiText}" />

  • 1
    No, you can only use the provided data types. – sfdcfox Feb 5 '19 at 12:58

Sorry this is currently not supported. Only String, Integer and Boolean are supported, where Strings can have a datasource that will present as a picklist.

Reference: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_design_files.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.