-1

After using aura:unescapedHtml Tag, font size varies. How to maintain similar font size in Text

  • Body Tag is rich Text,Text embedded with HTML Tags. while displaying the User Interface all font size should be similar.(PlainText).Irrespective of HTML Tags.Is it possible?

Below Code :

    <aura:iteration items="{!v.PaginationList }" var="item" indexVar="i">
    <div class="slds-has-flexi-truncate">
                       <div class= "slds-grid slds-wrap slds-text-body_small slds-text-body_regular">
                           <aura:unescapedHtml value="{!item.acc.Body}" />
                          </div> 
                    /div>
                </aura:iteration>
3
  • If the font size is varying, then the underlying HTML is varying. Examine your HTML, you'll likely find font tags or styles embedded in the HTML. – sfdcfox May 27 '20 at 5:38
  • yes..its embedded..but I dont want any varies in font size..is it possible? – Annappa May 27 '20 at 5:40
  • 2
    You would need to sanitize the input so it doesn't contain font changes (or whatever else you don't allow). This is a non-trivial subject at best. – sfdcfox May 27 '20 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.