88
Views
5
Comments
Solved
[CKEditor] CKEditor - How to remove only specific html tags
Question
Forge component by Matthias Preuter
29
Published on 25 Aug 2020

Hello,

I am using CKEditor where i have some content. I have used HTML Utils to convert the html tags to text but with this all the formatting(like bold,Italic) texts are also removed .  Is there a way somehow i can keep these text styling while converting.

Thank you.

mvp_badge
MVP
Rank: #18
Solution

Puja Rani,

You can use an Expression on your Email canvas to display your content with HTML properly rendered by setting its Escape Content to No. This will just put the HTML directly on your screen, allowing the browser/email client to interpret it instead of displaying it.

Use this property consciously as it disables safety mechanism that the platform does for you automatically where it safeguards your dynamic content from HTML/JavaScript code-injection.

Hope this helps!

mvp_badge
MVP
Rank: #18

Hi Puja Rani,

If you remove the HTML tags from you content you will lose all formatting...

Why are you removing the html tags to start with?

mvp_badge
MVP
Rank: #116

Hi Puja,

If you will remove all the HTML tags then it will automatically remove all the styling also as these styles are applied through HTML tags only, either through css class or style attribute.

So If you want styling without the HTML tags then I think there is no way to do that.


mvp_badge
MVP
Rank: #18
Solution

Puja Rani,

You can use an Expression on your Email canvas to display your content with HTML properly rendered by setting its Escape Content to No. This will just put the HTML directly on your screen, allowing the browser/email client to interpret it instead of displaying it.

Use this property consciously as it disables safety mechanism that the platform does for you automatically where it safeguards your dynamic content from HTML/JavaScript code-injection.

Hope this helps!