Developer forum

Forum » CMS - Standard features » Adding styles to backend editor dropdown

Adding styles to backend editor dropdown

Ton Martens
Reply

Hi,

How can 'styles' be added / removed / modified in the dropdownlist of the editor in de backend of DW?

The help-file mentions editing the \system\styles.xml-file, but that doesn't do anything.

Thanks.

Ton

 

 

 

 

 

 

 


Replies

 
Mikkel Ricky
Reply

Are you using the old editor (FCKEditor) or the new editor (CKEditor 4) released with Dynamicweb 8.3?

 
Ton Martens
Reply

The old one

 
Mikkel Ricky
Reply

Then you have to use System/Styles.xml. Try putting something like this into the file to see if it works.

<Style name="Code" element="span">
	<Attribute name="class" value="Code" />
	<Attribute name="style" value="border: 1px solid red;" />
</Style>
<Style name="Custom Bold" element="span">
	<Attribute name="style" value="font-weight: bold;" />
</Style>

Do you have a solution I can take a look at if you cannot make it work?

 

If possible, you should upgrade to the new editor – it's a lot better and easier to configure.
 

 

 
Ton Martens
Reply
Thank you.

 I used that file, like I mentioned when I started this thread, but it doesn't seem to work. I even did an application-pool-recycle.

 
Mikkel Toustrup Olsen
Reply

Hi Mikkel,

In what terms do you think the new editor is easier to configure?.I'm currently working with it and I find myself in a situation where usage of the styles.xml could come in handy. E.g. given the scenario a user needs the ability to style a bullet list in 3 different ways.. How will you accomplish this by not hardcoding the classes etc. into the source tab? :)

/MikkelTO

 
Mikkel Ricky
Reply

I would read the documentation for CKEditor 4 with focus on the Configuration Reference. More specifically I would read http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-stylesSet and http://docs.ckeditor.com/#!/api/CKEDITOR.stylesSet.

Best regards,
Mikkel

 

You must be logged in to post in the forum