[SalesForce] upload images with lightning:inputRichText

I'm not sure if I am just completely missing something or no one asks this question but I can't find a solution to this. I have a requirement to be able to upload images into the body of a rich text field which is being used to facilitate back and fourth communication in a SFDC community <> console.

enter image description here

I've built a lightning app which works well except I can't figure out how I'm supposed to upload images into the field. Is lightning:inputRichText even capable of doing so? There is no documentation that says it doesn't and it's supposed to replace the legacy ui:richText field (which does not allow for local import anyways). I've also tried the CKEditor approach and that also does not support local import, not to mention with lockerservice enabled it does not render.

I'm totally stumped, any help is appreciated.

Here is my component in case it helps:

<aura:component controller="caseCommentsController" implements="force:appHostable,forceCommunity:availableForAllPageTypes,force:hasRecordId" access="global">

<!-- display case comments -->
<div class="container slds-p-top--medium">
    <div id="list" class="row">
        <aura:iteration items="{!v.comments}" var="comment">
            <c:caseCommentsList comment="{!comment}"/>
        </aura:iteration>
    </div>   
</div> 

<!-- input form using components -->
<div class="container slds-p-top--large">
    <form class="slds-form--stacked">
        <div class="slds-form-element">
            <div class="slds-form-element__control">
                <!-- ui:inputText aura:id="caseid" disabled="true"
                           value="{!v.newComment.Case__c}"/ -->               
            </div>
        </div>
     <div class="slds-form-element">
       <div class="slds-form-element__control">
         <lightning:inputRichText aura:id="addComment" 
                                  disabledCategories="FORMAT_FONT"
                                  placeholder="Add a comment..."
                                  value="{!v.newComment.Comment__c}"/>                              
        </div>
      </div>
      <div class="slds-form-element">
        <ui:button label="Add Comment" 
                   class="slds-button slds-button--neutral"
                   labelClass="label"
                   press="{!c.createComment}"/>
      </div>    
</form>

Best Answer

Did you try copying and pasting the image ? I am in similar scenario - the image is pasted Ok, but the lightning page renders just with the link of the image instead of actually showing the image. I dont think the 'attach' option to upload image is not available on lightning:inputRichtext yet.

Related Topic