diff --git a/src/imagetoolbar.js b/src/imagetoolbar.js index 964f1122..db15a971 100644 --- a/src/imagetoolbar.js +++ b/src/imagetoolbar.js @@ -59,11 +59,18 @@ export default class ImageToolbar extends Plugin { const promises = []; const toolbar = new ToolbarView(); + // Add CSS class to the toolbar. + Template.extend( toolbar.template, { + attributes: { + class: 'ck-editor-toolbar' + } + } ); + // Add CSS class to the panel. Template.extend( panel.template, { attributes: { class: [ - 'ck-toolbar__container' + 'ck-toolbar-container' ] } } ); diff --git a/tests/imagetoolbar.js b/tests/imagetoolbar.js index ac3bcad6..529b519d 100644 --- a/tests/imagetoolbar.js +++ b/tests/imagetoolbar.js @@ -56,6 +56,11 @@ describe( 'ImageToolbar', () => { } ); } ); + it( 'should set css classes', () => { + expect( panel.element.classList.contains( 'ck-toolbar-container' ) ).to.be.true; + expect( panel.content.get( 0 ).element.classList.contains( 'ck-editor-toolbar' ) ).to.be.true; + } ); + it( 'should add ImageBalloonPanel to view body', () => { expect( panel ).to.be.instanceOf( ImageBalloonPanel ); } );