volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

AI OnAI Off

Limit some markup in the html-editor

Is it possible to limit certain kind of markup in the HTML-editor when working with episerver? 
Editors sometimes copy/paste from word for example and it can include formatting that's not sutable for the HTML-editor. 
I only want headers, paragraphs, links and lists and any other kind of formatting (like tables) should be cleared from the editor. 

Hope this make sense and that someone knows how I can solve this! 

Thank you in advance,

Matilda

#285951
Aug 22, 2022 12:26
Vote:

You should be able to override valid_elements.

The way you do this is slightly different based on your CMS version, but I think adding this should to the trick.

.AddSetting("valid_elements", "h1,h2,h3,h4,h5,h6")
#285952
Aug 22, 2022 12:55
Matilda - Aug 22, 2022 13:48
Thank you! Is this done in ExtendedTinyMceInitialization?
Tomas Hensrud Gulla - Aug 22, 2022 15:09
Yes, the initialization module class for TinyMCE configuration is called ExtendedTinyMceInitialization in the Alloy demo site. So, probably: yes.
error This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.