With the following plugin that enters a custom unordered list with both UL and LI having class names:
CKEDITOR.plugins.add( 'mylist', {
icons: 'mylist',
init: function( editor ) {
editor.addCommand( 'mylistCommand', {
exec : function( editor ) {
editor.insertHtml('<ul class="mylist"><li class="myitem"> </li></ul>');
}
});
editor.ui.addButton( 'My List', {
label: 'Insert My List',
command: 'mylistCommand',
toolbar: 'insert'
});
}
});
Everything works fine but when I type some text into the first bullet, then hit ENTER twice to get out off list item mode and create a new P tag, the P tag inherits the class="myitem". For example:
<ul class="mylist"> <li class="myitem">test</li> </ul> <p class="myitem"> </p>
Is there a way to stop that?
