|
|
@@ -87,6 +87,22 @@ describe( 'ClassicEditor', () => {
|
|
|
it( 'loads data from the editor element', () => {
|
|
|
expect( editor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'creates an instance of a ClassicEditor child class', () => {
|
|
|
+ class CustomClassicEditor extends ClassicEditor {}
|
|
|
+
|
|
|
+ return CustomClassicEditor.create( editorElement, {
|
|
|
+ plugins: [ Paragraph, Bold ]
|
|
|
+ } )
|
|
|
+ .then( newEditor => {
|
|
|
+ editor = newEditor;
|
|
|
+
|
|
|
+ expect( newEditor ).to.be.instanceof( CustomClassicEditor );
|
|
|
+ expect( newEditor ).to.be.instanceof( ClassicEditor );
|
|
|
+
|
|
|
+ expect( newEditor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
|
|
|
+ } );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'create - events', () => {
|