You need to sign in to do that
Don't have an account?
lightning:inputrichtext is inserting extra line breaks
When we use the lightning:inputRichText component the outputted HTML is generating extra space between lines than what the user sees when editing their text in the component. This behavior can be demonstrated using the example in Salesforce's own documentation here:
https://developer.salesforce.com/docs/component-library/bundle/lightning:inputRichText/example
Does anyone know how to prevent this behavior? If not, is this a bug in the comonent? If so, how are such bugs reported?
![Example showing incorrect behavior](/forums/servlet/rtaImage?eid=9060G0000005ieG&feoid=Body&refid=0EM0G0000003sWk)
https://developer.salesforce.com/docs/component-library/bundle/lightning:inputRichText/example
Does anyone know how to prevent this behavior? If not, is this a bug in the comonent? If so, how are such bugs reported?
slds-rich-text-area__content should be used instead of slds-text-longform
All Answers
slds-rich-text-area__content should be used instead of slds-text-longform
AURA comp :
<aura:handler name="change" value="{!v.emailBodyDisplay}" action="{!c.handleValueChange}"/>
<lightning:inputRichText value="{!v.emailBodyDisplay}" placeholder="Type something interesting"/>
controller :
handleValueChange: function(component, event, helper)
{
var updatedBody = component.get('v.emailBodyDisplay');
component.set('v.emailBodyChanged', encodeURIComponent(updatedBody));
}