Hi,
I cannot get the following to work, whether done via jQuery as shown here:
This works as far as the config line, but setRules on the next instruction doesn’t take. It would need to be applied to all instances of the editor.
If I break out just the setRules instruction into a separate ‘script’ block using the CKEDITOR object independently of jQuery then it still doesn’t work.
Also, is it at all possible to have a ‘null’ format applied to a piece of text. ‘Normal’ means ‘p’, but is there a method to not apply any tag to a block of text?
Thanks in advance
Rob
I cannot get the following to work, whether done via jQuery as shown here:
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var config = {
toolbar:
[
['Bold', 'Italic', '-', 'NumberedList', 'BulletedList'],
['Styles','Format'],
['Source']
]
};
// Initialize the editor.
$('.wysiwyg').ckeditor(config);
$('.wysiwyg').ckeditor.on( 'instanceReady', function( ev )
{
//
// Modify the html output formatting for ‘p’ tags
//
ev.editor.dataProcessor.writer.setRules( p,
{
indent : false,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
});
});
});
//]]>
</script>
This works as far as the config line, but setRules on the next instruction doesn’t take. It would need to be applied to all instances of the editor.
If I break out just the setRules instruction into a separate ‘script’ block using the CKEDITOR object independently of jQuery then it still doesn’t work.
Also, is it at all possible to have a ‘null’ format applied to a piece of text. ‘Normal’ means ‘p’, but is there a method to not apply any tag to a block of text?
Thanks in advance
Rob

can't get config to work when using jquery
I'm using the "jquery way" to instantiate my ckeditor, but it won't take the config settings at all. Any ideas? Thanks!
var config = {
toolbar : [ [ 'Bold', 'Italic', 'Underline', '-', 'RemoveFormat' ], [ 'Link', 'Unlink' ] ],
height : 150,
width : 764,
skin : 'cList'
};
this.editor = $('#editor1').ckeditor(config);