Browse Source

Internal: Aligned the codebase after refactoring of the ck-editor-toolbar mixin in theme-lark. Closes #104.

Aleksander Nowodzinski 8 years ago
parent
commit
ab33a2d1bf

+ 8 - 1
packages/ckeditor5-image/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'
 				]
 			}
 		} );

+ 5 - 0
packages/ckeditor5-image/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 );
 	} );