I am trying to apply external css stylesheet to the contents inside a ckeditor. I tried to apply the ways mentioned in documentation, e.g.:-
//config.js
CKEDITOR.editorConfig = function( config ) {
config.toolbar = 'TadToolbar';
config.toolbar_TadToolbar =
[
['Source','-','Templates','-','Cut','Copy','Paste'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Format','FontSize','-','TextColor','BGColor']
];
///some more config here
config.extraPlugins = 'stylesheetparser';
contentsCss = 'http://cheaper.com.hk/admin/try.css';
config.stylesSet = [];
};
and also in the page:-
//test.php
<script>
CKEDITOR.replace('editor_en', {
fullPage: true,
allowedContent: true,
contentsCss : 'http://cheaper.com.hk/admin/try.css'
});
</script>
but the css file still cannot be appled:-
http://cheaper.com.hk/admin/test.php?id=22
is there anything I can do further? Thanks!
That seems to work for me.
That seems to work for me.
If I switch to source view and insert a div with id
I see that the styles are applied.
Maybe you should improve your stylesheet so it includes what you want to use
No way
In my case.. the combo Styles box remain still empty.
I'm unable to find any way to let it works.
I can's see if it's related to the browser version or something else.
Stefano