0

I'm having a rich text area in my lightning component. On clicking "Save" button, I want to create files if any inline image is added to that rich text area.

I'm having an idea that if I,m able to get the "Content-ID" value then I can take that image out and create it as an attachment. Is this idea correct? If not, please give me some suggestions.

Code Snippet:

<aura:component>
<lightning:inputRichText value="{!v.Description__c}" placeholder = "Please enter here" >
 <lightning:insertImageButton/>
</lightning:inputRichText>
</aura:component>
2
  • I can't see an option to add inline images in richTextArea in lighting aura , can you add your code snippet and screenshot? Commented Feb 6, 2019 at 20:03
  • I'm having a rich text area field in a custom object. And I have created a rich text area in my lightning component using lightning:inputRichText. On clicking "Save" I'm storing this value into that custom field. Please see my updated question
    – uma451
    Commented Feb 7, 2019 at 6:15

1 Answer 1

0

The above requirement can be done via using "shareWithEntityId" attribute inside lightning:inputRichText. Here is the update code:

<aura:component>
<lightning:inputRichText value="{!v.Description__c}" placeholder = "Please enter here" shareWithEntityId = "{!v.recordId}">
  <lightning:insertImageButton/>
</lightning:inputRichText>
</aura:component>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .