I want to add a new style to the style tab
i have tried following this tutorial
http://docs.cksource.com/CKEditor_3.x/D ... ser_Plugin
and have decided to use the external JS method
the document says to configure the external js file this way
{
name : 'Name displayed in the Styles drop-down list',
element : 'HTML element name (for example "span")',
styles :
{
'css-style1' : 'desired value',
'css-style2' : 'desired value',
...
}
attributes :
{
'attribute-name1' : 'desired value',
'attribute-name2' : 'desired value',
...
}
}
but when i do that my notepad highlights the code as having an error
could someone tell me how to work it by filling in the blanks in what i have pasted in ubove so i can see a working example
Sun, 08/12/2012 - 21:29
#1
Re: styles
You can see an example linked from that page in the section where it's explained:
http://svn.ckeditor.com/CKEditor/trunk/ ... default.js
Re: styles
i have applied the example configuration but it still isnt working
the scipr in the page where the ckeditor appears looks like this
<script type="text/javascript">CKEDITOR.replace( 'content' );
CKEDITOR.config.stylesSet = 'my_styles:http://www.X.co.uk/newsite/backend/ckeditor/plugins/styles/styles/custom.js';
</script>
and i changed
CKEDITOR.stylesSet.add( 'default'
in the custom js to read
CKEDITOR.stylesSet.add( 'my_styles'
but all i get is a empty list under the styles tab