Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Rich Text Editor field adding breaks between lines.

  • 1.  Rich Text Editor field adding breaks between lines.

    SILVER CONTRIBUTOR
    Posted 4 days ago

    We have an entity where the users capture their meeting notes and using Power Automate (Flow) we email them to the team if they have flagged them to be sent.

    I added the RTF control to a field and it works great in the UI. The issue I have is it seems the HTML that is saved includes breaks (<br>) so the text sent does not look like the text entered.





    References on configuring the Rich Text Editor

    Adding a Rich Text Editor to any Multiline text field – Video by Gus Gonzalez

    Rich Text Fields in Dynamics 365 and Model Driven Power Apps – Blog by Lisa Crosbie



    ------------------------------
    Jeff Botts
    Sempra Global
    San Diego CA
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 2.  RE: Rich Text Editor field adding breaks between lines.

    TOP CONTRIBUTOR
    Posted 3 days ago
    I would put in a ticket because that does not look like correctly formed HTML: <br> tags should not be nested inside a <ul> tag.

    In the meantime, since you are using Flow, you could use a Replace() function expression in your flow to replace the double <br> tags with single <br/>, and replace the <br>...<li> tags with just <li>.

    ------------------------------
    If this answered your question, please click on the arrow button next to Reply Inline and choose 'Make Best Answer.'
    Thanks.
    Nelson Johnson, Solution Architect
    BroadPoint, Inc., Bethesda MD
    Link with me! https://www.linkedin.com/in/nelsonjohnson/
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 3.  RE: Rich Text Editor field adding breaks between lines.

    SILVER CONTRIBUTOR
    Posted 3 days ago
    Thanks @Nelson Johnson. I have created a support ticket​ so I will report back where how that goes. So far the initial support person has passed the ticket to a "dedicated team to address these inquiries called Customizations".

    I appreciate the Flow suggestions and I will review this with the developer.

    ------------------------------
    Jeff Botts
    Sempra Global
    San Diego CA
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 4.  RE: Rich Text Editor field adding breaks between lines.

    SILVER CONTRIBUTOR
    Posted 3 days ago
    We discovered the issue and it was in our Flow code.

    Before the Rich Text Editor Control was available we developed the Flow to produce a nice HTML formatted email. The developer added code looking for carriage returns in the plain text and replaced it with the <br> tags.  The Rich Text Editor Control adds <div> tags instead and Outlook uses the standard logic of placing a line break before and after the <div> element. So the combination of <div> and our code adding <br> caused the issue.

    We simply removed that part of the code in Flow adding the <br> tags and it all works as expected.

    ------------------------------
    Jeff Botts
    Sempra Global
    San Diego CA
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


If you've found this thread useful, dive deeper into User Group community content by role