I'm using te Stylesheet Parser Plugin to load my Stylesheet in the CKeditor. But when I look at the dropdown from styles, this one is empty. How can I add a few classes from my stylesheet to that list, I tried a lot but everytime my style list is empty
Tue, 06/05/2012 - 10:27
#1

Re: problem with style list
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: problem with style list
Re: problem with style list
this Howto page
CKEDITOR.stylesSet.add( 'my_styles', [ // Block-level styles { name : 'Blue Title', element : 'h2', styles : { 'color' : 'Blue' } }, { name : 'Red Title' , element : 'h3', styles : { 'color' : 'Red' } }, // Inline styles { name : 'CSS Style', element : 'span', attributes : { 'class' : 'my_style' } }, { name : 'Marker: Yellow', element : 'span', styles : { 'background-color' : 'Yellow' } } ]); config.stylesSet = 'my_styles';Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: problem with style list
CKEDITOR.replace('ctl00$ContentPlaceHolder1$editor1', { extraPlugins: 'stylesheetparser', contentsCss: 'http://vti.wijni.be/styles/verpleegkunde.css' });CKEDITOR.stylesSet.add('my_styles', [ // Block-level styles {name: 'Blue Title', element: 'h2', styles: { 'color': 'Blue'} }, { name: 'Red Title', element: 'h3', styles: { 'color': 'Red'} }, // Inline styles {name: 'CSS Style', element: 'span', attributes: { 'class': 'my_style'} }, { name: 'Marker: Yellow', element: 'span', styles: { 'background-color': 'Yellow'} } ]); CKEDITOR.editorConfig = function (config) { config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ { name: 'document', items: ['NewPage', 'Preview'] }, { name: 'clipboard', items: ['Cut', 'Copy', 'PasteText', '-', 'Undo', 'Redo'] }, { name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll'] }, { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] }, '/', { name: 'styles', items: ['Styles', 'Format'] }, { name: 'basicstyles', items: ['Bold', 'Italic', '-', 'RemoveFormat'] }, { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] }, { name: 'links', items: ['Link', 'Unlink', 'Anchor'] } ]; config.stylesSet = 'my_styles'; };Re: problem with style list
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: problem with style list