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

RichTextEditor issue

I have an list in SP, that contains multiline text

 

I need to show them as preview.

I can do it with Label, but I need to make title bold. RichTextEditor can make separate words as bold, but read without line breaks.

Any ways to do it?

 

Please, see screenshots

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Yerlasdutco :

The key is that RichTextEditor parses text through HTML, and Char(10) has no meaning for it.

Because there is no newline character "</br>" in your default string but only char(10), the characters in your RichTextEditor will never wrap.

So,I suggest you replace all char(10) in the original text with "</br>":

Substitute(DataCardValue,Char(10),"</br>")

Best Regards,

Bof

View solution in original post

8 REPLIES 8
v-bofeng-msft
Community Support
Community Support

Hi @Yerlasdutco :

You could consider using HtmlText control to display the content of multiple line text.(Just set the HtmlText control's HtmlText proeprty)

1.PNG

Best Regards,

Bof

@v-bofeng-msft 

 

But problem is, that richtexteditor and htmltext doesn't see line breaks in multiline text from SP.

There are any ways to add them?

 

Hi @Yerlasdutco :

The key is that RichTextEditor parses text through HTML, and Char(10) has no meaning for it.

Please use 

 

"</br>"

 

to replace

 

Char(10)

 

in RichTextEditor.

Best Regards,

Bof

@v-bofeng-msft 

Not working for both

 

Yerlasdutco_0-1619599959855.png

 

Hi @Yerlasdutco :

Could you tell me what RichTextEditor's Default property is?

Have you edited the RichTextEditor? (This will cause its Default property to not work, you need to reset it first)

1.PNG

Best Regards,

Bof

Yes, it works only for words added manually to Default, but not if I read from multiline text from SP

Yerlasdutco_0-1619600523006.png

 

Hi @Yerlasdutco :

The key is that RichTextEditor parses text through HTML, and Char(10) has no meaning for it.

Because there is no newline character "</br>" in your default string but only char(10), the characters in your RichTextEditor will never wrap.

So,I suggest you replace all char(10) in the original text with "</br>":

Substitute(DataCardValue,Char(10),"</br>")

Best Regards,

Bof

@v-bofeng-msft 

 

Thank you! Now it works fine

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,777)