CKEditor Exception Demo
HTML
<script src="//cdn.ckeditor.com/4.4.7/standard/ckeditor.js"></script>
<div id="editor1" autocomplete="off" autocorrect="off" role="group" aria-label="Rich Text Editor - type your response."></div>
JavaScript
CKEDITOR.on('instanceReady', function (ev) {
var doc = editor.document.$;
var win = editor.document.getWindow().$;
var s = '<style>.cke_editable ul, .cke_editable ol { ' +
'margin-left: .5em; ' +
'list-style: inside; ' +
'}</style>';
if(doc == document){
console.log('*** Inline');
$('head').append(s);
}else{
console.log('*** iFrame');
$('.cke_wysiwyg_frame').contents().find('head').append(s);
}
});
var editor = CKEDITOR.appendTo('editor1');