Just to set your expectations I'm fairly new to developing lightning components.

The reason why I'm asking is I want to add additional functionality like a CSS class selection for a list so that an admin can copy/paste content directly on the content editors input box and set a style variant for that instance.

I've already tried creating a custom component, added a design attribute for selecting CSS classes that updates the component's inline CSS class. I've tried using lightning:inputRichText hoping that the admin could update that and I'll just do some Javascript manipulation to hide the input and just have the formatted output displayed on preview but clicking the dropped custom component would just open the property popup box.

To better explain what's my desired output, I have an illustration below.

enter image description here

  • Based on your illustration, seems you want to add a custom button to add a CSS to the Rich Content Editor, if that's what you are looking for then it's not possible. You may like to look at this answer for further details.
    – Jayant Das
    Jan 23 '19 at 15:54
  • Yes a custom button (and a rich text/text area field too ). If only there's a way to extend an out of the box lightning component. Anyway, thanks for the answer.
    – Eric
    Jan 24 '19 at 2:46

Your Answer

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

Browse other questions tagged or ask your own question.