diff --git a/src/ckeditor.js b/src/ckeditor.js index c06e5e0c..d8fdaabf 100644 --- a/src/ckeditor.js +++ b/src/ckeditor.js @@ -23,49 +23,48 @@ import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph'; export default class BalloonEditor extends BalloonEditorBase {} -BalloonEditor.build = { - plugins: [ - EssentialsPlugin, - UploadadapterPlugin, - AutoformatPlugin, - BoldPlugin, - ItalicPlugin, - BlockquotePlugin, - EasyimagePlugin, - HeadingPlugin, - ImagePlugin, - ImagecaptionPlugin, - ImagestylePlugin, - ImagetoolbarPlugin, - ImageuploadPlugin, - LinkPlugin, - ListPlugin, - ParagraphPlugin - ], - config: { - toolbar: { - items: [ - 'heading', - '|', - 'bold', - 'italic', - 'link', - 'bulletedList', - 'numberedList', - 'imageUpload', - 'blockQuote', - 'undo', - 'redo' - ] - }, - image: { - toolbar: [ - 'imageStyle:full', - 'imageStyle:side', - '|', - 'imageTextAlternative' - ] - }, - language: 'en' - } +BalloonEditor.builtinPlugins = [ + EssentialsPlugin, + UploadadapterPlugin, + AutoformatPlugin, + BoldPlugin, + ItalicPlugin, + BlockquotePlugin, + EasyimagePlugin, + HeadingPlugin, + ImagePlugin, + ImagecaptionPlugin, + ImagestylePlugin, + ImagetoolbarPlugin, + ImageuploadPlugin, + LinkPlugin, + ListPlugin, + ParagraphPlugin +]; + +BalloonEditor.defaultConfig = { + toolbar: { + items: [ + 'heading', + '|', + 'bold', + 'italic', + 'link', + 'bulletedList', + 'numberedList', + 'imageUpload', + 'blockQuote', + 'undo', + 'redo' + ] + }, + image: { + toolbar: [ + 'imageStyle:full', + 'imageStyle:side', + '|', + 'imageTextAlternative' + ] + }, + language: 'en' }; diff --git a/tests/ckeditor.js b/tests/ckeditor.js index b051fa3e..7e8ed050 100644 --- a/tests/ckeditor.js +++ b/tests/ckeditor.js @@ -24,11 +24,11 @@ describe( 'BalloonEditor build', () => { describe( 'buid', () => { it( 'contains plugins', () => { - expect( BalloonEditor.build.plugins ).to.not.be.empty; + expect( BalloonEditor.builtinPlugins ).to.not.be.empty; } ); it( 'contains config', () => { - expect( BalloonEditor.build.config.toolbar ).to.not.be.empty; + expect( BalloonEditor.defaultConfig.toolbar ).to.not.be.empty; } ); } );