TinyMCESettings: Different CSS for different parts of the site

Vote:
 

Is it possible to use different css files for the XHtml property editing (TinyMCESettings) for different sections on the site? We would like to do something like: if XHtml property exist on PageType A with property B set to C then use A.css, otherwise use B.css. But where to put logic like this?

The css to use for XHtml editing can be defined in various ways:

  • web.config
  • Inheriting from PropertySettings and implementing the GetPropertySettings() method
  • Manually overriding value from code in admin

But all of these options set the same css-file (or files) for all XHtml properties over the entire site. (Is is possible to get some epi-context in the 2:nd option?)

#148818
May 24, 2016 14:47
Vote:
 

Hmm.. Thats a great question, have a look at this article http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Editing/Customizing-the-TinyMCE-editor/

Scroll down little bit and you'll find:

~/Templates/Public/Styles/Glossy/Editor.css, ~/Templates/Public/Styles/Glossy/Editor2.css

I've done some quick research and i found that if you go to Admin Mode in EPiServer > Content Type > PageType with XhtmlString, click the property name and then Custom Settings, there you'll find Content CSS Path, so you can set a specific path for your css file and i guess you could do it in code aswell, probably as an attribute on your property.

I'll follow this thread, tell us what you found :D

#148836
May 24, 2016 17:38
* 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.