04 May 2015

Limit editing HTML source for rich text editor field in Sitecore

I recently get a requirement about limiting the way of editing ram html in Rich Tex Editor. After a few digging around the Sitecore, here is how I figured.


There are two places in Rich Text editor you can change the html markup in Content Editor.

1st place

2nd place


For 1st place, goes to Core database "/sitecore/system/Field types/Simple Types/Rich Text" and in "Security Editor" to deny "read" for both items as highlighted for the "Sitecore Roles" you prefer.





For 2nd place, it is a bit of tricky. We first need to find out what is our default profile is by going to web.config.

<setting name="HtmlEditor.DefaultProfile" value="/sitecore/system/Settings/Html Editor Profiles/Rich Text Default" />

After that, we located this profile in "Core" database and locate 
"/sitecore/system/Settings/Html Editor Profiles/Rich Text Default/Buttons/HTML View"


So we need to do the same by deny "read" from "Security editor" for certain roles as well.


Done!

No comments:

Post a Comment

WFFM Web form for marketer fail to submit in Sitecore

I have setup a standard form using WFFM in Sitecore 8.2. It always fail when submit. Error as below, Error: Exception: System.Data.DataE...