Sitefinity 5.x: Add custom CSS class dropdown to content block editor?
Hello, is there a way (in Sitefinity 5.x) to add dropdown list of custom CSS classes to the editor used when editing content blocks?
Tried following the instructions found at
http://www.sitefinity.com/developer-network/forums/designing-styling/custom-css-in-editor
but the following exception was thrown:
Exception Type: Telerik.Sitefinity.Web.UI.TemplateException
Message: A required control was not found in the template for "~/xxxxx/ContentEditor.ascx". The control must be assignable from type "Telerik.Sitefinity.Web.UI.CommandBar" and must have ID "editViewCommandBar".
If anyone has a clue, your help would be greatly appreciated and many thanks in advance.
Ed,
You can modify the setting in the Sitefinity admin. You'll need to go to Administration -> Settings then Text Editor. After that, click on "Edit" next to the Default tool set.
Add the Apply Class too to the editor by placing it in the XML.
<
tool
name
=
"ApplyClass"
/>
<
classes
>
<
class
name
=
"Clear Class"
value
=
""
/>
<
class
name
=
"Special Class 1"
value
=
".sc1"
/>
<
class
name
=
"Special Class 2"
value
=
".sc2"
/>
</
classes
>
<
cssFiles
>
<
item
name
=
"~/Sitefinity/WebsiteTemplates/TemplateName/App_Themes/Theme/Global/radStyles.css"
/>
</
cssFiles
>
Never thought this would be under "basic settings". Excellent! Thank you!