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 : HjFyH1p2YzMqvRWIDJP+NS
Power Pages - Customize & Extend
Unanswered

Rich text editor and community posts issues

Like (0) ShareShare
ReportReport
Posted on 15 Feb 2024 12:22:53 by 12

Hi,

I've discovered some issues with creating and editing posts on a community forum, such as extra html tags when a user edits their post or reply. So how can I remove the rich text editor from creating and editing community forum posts?

Categories:
I have the same question (0)
  • Jady Profile Picture
    134 on 20 Feb 2024 at 01:28:25
    Re: Rich text editor and community posts issues

    Not an elegant solution but I created a JavaScript function to remove all the extra HTML tags added by the Rich Text Editor. 

    function removeStyling(parentClass) {
        // Function to remove inline styling from HTML text.
        $(parentClass).find('div, span, ul, ol, li, p, h1, h2, h3, h4, h5, h6, a, strong, em').removeAttr('style');
        $(parentClass).find('img').removeAttr('height, width, style');
    }
    The Rich Text Editor adds inline style attributes, so I simply remove the style attribute from each line of HTML. 

    I call this function in any web page that displays content from the Rich Text Editor, for example Knowledgebase Articles. "parentClass" is the class name of the outer HTML container. 

     

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…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2

Featured topics

Loading complete