web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Rich text reflecting as plain text in gallery

(0) ShareShare
ReportReport
Posted on by 10
I have richtextbox dialog when saved displays as plaintext in gallery. May i know whats the issue here?
 
 
Gallery
 
 
Gallery TextInput
ThisItem.Description
Categories:
I have the same question (0)
  • Suggested answer
    MParikh Profile Picture
    286 Super User 2025 Season 2 on at
    Rich text reflecting as plain text in gallery

    Power Apps doesn't natively render HTML formatting from rich text fields in galleries. The rich text editor stores content as HTML, but when you display ThisItem.Description in a label, you get the raw text without formatting. I have shown couple of example below which i have used. 

    1. Use HtmlText property (limited support)
     
    Change your label's Text property to HtmlText: 
     
     
    <Label>.HtmlText = ThisItem.Description
     This renders basic HTML tags like <b>, <i>, <u>, <br>, but strips complex formatting like background colors, custom fonts, and nested styles. Based on your screenshot with highlights and underlines, this won't work well.
     
    2. Strip HTML tags completely
     
    If formatting isn't needed in the gallery, clean the text: 
     
     
    With(
        {rawText: ThisItem.Description},
        Substitute(
            Substitute(
                Substitute(rawText, "<br>", " "),
                Substitute(rawText, Regex(rawText, "<[^>]*>"), "")
            ),
            "&nbsp;", " "
        )
    )
     This removes all HTML tags and leaves plain text.
     
    3. Create a plain text shadow field
     
    Add a new plain text column in your data source. When users save rich text, extract and store a plain version separately: 
     
     
    Patch(
        YourDataSource,
        ThisRecord,
        {
            Description: RichTextEditor.HtmlText,
            Description_Plain: PlainText(RichTextEditor.HtmlText)
        }
    )
     Then bind the gallery label to ThisItem.Description_Plain.
     
    4. Use a custom HTML control (workaround)
     
    Add an HTML text control inside your gallery template instead of a label. Set its HtmlText property: 
     
     
    <HtmlText>.HtmlText = ThisItem.Description
    This gives better HTML rendering than labels but adds complexity and performance overhead in galleries with many items.
     
    5. Show truncated preview, full text on selection 
     
    Display simplified text in the gallery, then show the full rich text in a detail screen or expanded view when users click an item. This is the most common pattern for rich text in Power Apps.
     
     
    Gallery Label: Left(PlainText(ThisItem.Description), 100) & "..."
    Detail Screen RichTextControl: ThisItem.Description
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 686 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 433 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 266 Moderator

Last 30 days Overall leaderboard