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>
  • I can't see an option to add inline images in richTextArea in lighting aura , can you add your code snippet and screenshot? – Pranay Jaiswal Feb 6 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 Feb 7 at 6:15
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>

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.