cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yerlasdutco
Helper II
Helper II

Rich Text Editor Line Spacing

Hi Folks!

 

I have a problem with Rich Text Editor. There are very large spacing between lines, when I export it to the PDF File or view.

Any way to decrease this space? Screenshots (In PowerApps Editor, PowerApps preview, PDF File)

 

Yerlasdutco_0-1627470507777.png

Yerlasdutco_1-1627470586447.png

Yerlasdutco_2-1627470646524.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

The RichTextEditor outputs HtmlText as a property. If you preview that code, you can see that a carriage return (hitting enter), actually formats the text as separate paragraphs. To have smaller spaces, you'd need to substitute those <p></p> with breaks <br>.

GarethPrisk_0-1627492432461.png

Something like this...you can see the examples above where the right-most controls are HTML, and showing how it ends up formatting both.

Substitute(
    RichTextEditor1.HtmlText,
    "</p><p>",
    "<br>"
)

View solution in original post

4 REPLIES 4
GarethPrisk
Resident Rockstar
Resident Rockstar

The RichTextEditor outputs HtmlText as a property. If you preview that code, you can see that a carriage return (hitting enter), actually formats the text as separate paragraphs. To have smaller spaces, you'd need to substitute those <p></p> with breaks <br>.

GarethPrisk_0-1627492432461.png

Something like this...you can see the examples above where the right-most controls are HTML, and showing how it ends up formatting both.

Substitute(
    RichTextEditor1.HtmlText,
    "</p><p>",
    "<br>"
)

@GarethPrisk 

 

Thank you for your reply. I have Substitute already. 

Substitute(Substitute( Text11_19.HtmlText, "<li>", "<br>•   "), "</li>", Char(10))

 It pastes new line after bullet. How can I combine it with <p></p>?

This is the exact solution that I need.  But I'm not sure where the code should be placed.  Is this code that is added to the HTML editor, to my patch, or somewhere else?

Use "Shift+enter" instead of "enter" to resolve the issue.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,665)