2011-11-12, 03:55:20
Thanks for the hint re: the slash mvlcek - you are right - this works - your forward slash in your origiinal example doesn't work:
As for linking the Styles js for the dropdown menu, after hours of trial-and-error testing I've determined that of the 3 examples I've seen - none of them will work locally (ie using WAMP server). However two of them will work with absolute links:
This example given in the Wiki does NOT work:
And in the CKEditor.js file "you must instruct the editor to apply the newly registered style" by putting "config.stylesSet" AFTER (NOT before) CKEDITOR.stylesSet.add as in the example below:
And finally, these definitions are of interest:
Still working through the rest of it.
Charles
Code:
contentsCss: 'theme/my_theme/style.css'
As for linking the Styles js for the dropdown menu, after hours of trial-and-error testing I've determined that of the 3 examples I've seen - none of them will work locally (ie using WAMP server). However two of them will work with absolute links:
Code:
stylesCombo_stylesSet: 'my_styles:http://www.mysite.com/ckeditorstyles.js',
Code:
stylesSet: 'my_styles:http://www.mysite.com/ckeditorstyles.js',
This example given in the Wiki does NOT work:
Code:
entities : false,customConfig: 'my_styles:http://www.mysite.com/ckeditorstyles.js',
And in the CKEditor.js file "you must instruct the editor to apply the newly registered style" by putting "config.stylesSet" AFTER (NOT before) CKEDITOR.stylesSet.add as in the example below:
Code:
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';
And finally, these definitions are of interest:
Quote:* Block-level styles – applied to the text blocks (paragraphs) as a whole, not limited to the text selections. These apply to the following elements: address, div, h1, h2, h3, h4, h5, h6, p, and pre.
* Object styles – applied to special selectable objects (not textual), whenever such selection is supported by the browser. These apply to the following elements: a, embed, hr, img, li, object, ol, table, td, tr and ul.
* Inline styles – applied to text selections for style rules using elements not defined in other style types.
Still working through the rest of it.
Charles