Skip to main content
Community site session details

Community site session details

Session Id : VNQZUyB616+eqt8eaxVJS7
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:
  • 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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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