function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ulas KutukUlas Kutuk 

Lightning Rich Text display issue

Has abyone able to use Rich Texts as expected with lightning experience ? it displays as text area no matter what.
Ashish DevAshish Dev
doc @ https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ui_richtext.htm says
"In this demo, the isRichText="false" attribute replaces the component with the ui:inputTextArea component. The WYSIWYG rich text editor is provided when this attribute is not set, as shown below."
Ulas KutukUlas Kutuk
@Ashish I'm not setting  isRichText="false", but its displaying as text area
Nikhil Sharma 17Nikhil Sharma 17
This is the simple example for showing rich text area as you want


//This is the Component code

<ui:inputRichText aura:id="inputRT" label="Rich Text Demo"
    cols="50" rows="5" value="&lt;b&gt;Aura&lt;/b&gt;, &lt;span style='color:red'&gt;input rich text demo&lt;/span&gt;"/>
  <ui:button aura:id="outputButton"
    buttonTitle="Click to see what you put into the rich text field"
    label="Display" press="{!c.getInput}"/>
  <ui:outputRichText aura:id="outputRT" value=" "/>

/*Client-side controller*/

 getInput : function(cmp) { var userInput = cmp.find("inputRT").get("v.value"); var output = cmp.find("outputRT"); output.set("v.value", userInput); }
Ulas KutukUlas Kutuk
OK, copying and pasting from SF documentation is not helping guys :) Pls post something if u ever tried or see its working. I also have access to those docs. 
Nikhil Sharma 17Nikhil Sharma 17
Its working here with the above code.

User-added image
JDallasJDallas
In case anyone else runs into this issue, ui:inputRichText is not suppoprted when LockerService is activated:

User-added image
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_ui_inputRichText.htm

Use lightning:inputRichText instead: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_inputRichText.htm