Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Extract text from knowledge

Kalaiarasan Pus
Giga Sage

Is there a easy way to extract the text from knowledge articles and wipe away the HTML tags as well? I am looking to convert or copy the knowledge articles HTML content to plain text.

I have already tried getHTMLValue() but the resulting text still have the HTML tags.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

I've done this with web pages. A simple RegEx replace worked well for me.



var noHTML = rawText.replace(/<[^>]*>/g, '');

View solution in original post

3 REPLIES 3

Chuck Tomasi
Tera Patron

I've done this with web pages. A simple RegEx replace worked well for me.



var noHTML = rawText.replace(/<[^>]*>/g, '');

Hey Thanks !


But no API right OOB for this?


You are welcome.



Nothing OOB that I'm aware of. It wouldn't take much to make a UI action to do that however.