Input Rich Text
A WYSIWYG editor with a customizable toolbar for entering rich text
Descriptor
lightning:inputRichTextTargets
Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out / Visualforce, Standalone Lightning App
Example Options
Rich Text EditorBasic rich text editor with initial value set in the init handler. Rich Text Editor with Bottom ToolbarVariant bottom-toolbar places toolbar below editor panel.
Rich Text Editor
hi!
Output
hi!
Code
<aura:component> <aura:attribute name="myVal" type="String" /> <aura:handler name="init" value="{! this }" action="{! c.init }"/> <lightning:inputRichText value="{!v.myVal}" placeholder="Type something interesting"/> <h1 class="slds-m-top_large slds-text-heading_medium">Output</h1> <div aura:id="output" class="slds-box editor slds-text-longform"> <lightning:formattedRichText value="{!v.myVal}" /> </div> </aura:component>