cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Using HTML & PlainText() function together

Hi Folks.

On my app I have a text field in a Collection and when I click the text I open a Dialog form where I can insert formatted text using Rich Text Editor. (See figure HTML1).

After updating this field, I go back to my main form but I don't like to show the content with HTML tags. Then I put a PlainText(ThisItem.FIELD) function to fix that. (See figure HTML2). You can see I currently have two fields, one using PlainText(ThisItem.FIELD), and the other NOT using PlainText(ThisItem.FIELD) function.


If I click again on that field to edit, the Rich Text Component will not show the HTML format, because the PlainText function removed that (See figure HTML3).

Question: Is there a better way to format that text without lose the HTML content?

Thanks in advance for your prompt reply.

Ricardo.

1 ACCEPTED SOLUTION

Accepted Solutions
Resolver III
Resolver III

Hey @rcarneiroIE 

Think there are 2 options:
2.) For the display use htmlText control it will also display html without tags - again no need to use plain text function
html.png

3.) Create additional field / variable "middle man" to store value of the html in initial field and plain text in middle man
Currently you are overwriting the content of html thus is displaying without tags.

Hope it make sense and helps you
if yes please remember to select this answer as solution to help other community members to find answer quicker.
Regards
Dawid

View solution in original post

4 REPLIES 4
Resolver III
Resolver III

Hey @rcarneiroIE 

Think there are 2 options:
2.) For the display use htmlText control it will also display html without tags - again no need to use plain text function
html.png

3.) Create additional field / variable "middle man" to store value of the html in initial field and plain text in middle man
Currently you are overwriting the content of html thus is displaying without tags.

Hope it make sense and helps you
if yes please remember to select this answer as solution to help other community members to find answer quicker.
Regards
Dawid

View solution in original post

Hi 365CornerDawid,

Thanks for your reply.

One last question, I am using your suggestion but the HTML is like "NOT formatted", in this case I have to use some inline CSS in order to well format that, right?

Is that also possible to remove the scroll bar on the right?

SEE IMAGE ATTACHED. (Reference Column)

Thanks.

Hi @rcarneiroIE 

Yup in the stream of your work the option is to use inline css.

Regarding scrollbar it all depends on the size of the control, amount of the text and padding settings. If you will remove default paddings from top and bottom it will consume less space but Power apps detects if you have one or more lines of text / content.


My suggestion would be to try play with galleries and auto height settings.

Regards
Dawid

Ok Dawid, many thanks for that.

 

Best,

 

Ricardo.

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (9,498)