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

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,477)