1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
/* bender-tags: editor,unit */
/* bender-ckeditor-plugins: wysiwygarea */
CKEDITOR.replaceClass = 'ckeditor';
bender.test( {
'test auto initilization': function() {
CKEDITOR.on( 'instanceReady', function( evt ) {
if ( evt.editor.name == 'editor1' ) {
resume( function() {
assert.areEqual( '<p>ed1</p>', bender.tools.compatHtml( evt.editor.getData() ) );
} );
}
} );
wait();
},
'test replace': function() {
CKEDITOR.replace( 'editor2', { on: {
instanceReady: function( evt ) {
resume( function() {
assert.areEqual( '<p>ed2</p>', bender.tools.compatHtml( evt.editor.getData() ) );
} );
}
} } );
wait();
}
} );
|