Parcourir la source

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

Aleksander Nowodzinski il y a 8 ans
Parent
commit
c6c8083676

+ 7 - 0
packages/ckeditor5-editor-classic/src/classiceditoruiview.js

@@ -10,6 +10,7 @@
 import BoxedEditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/boxed/boxededitoruiview';
 import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview';
 import StickyToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/sticky/stickytoolbarview';
+import Template from '@ckeditor/ckeditor5-ui/src/template';
 
 /**
  * Classic editor UI view. Uses inline editable and sticky toolbar, all
@@ -34,6 +35,12 @@ export default class ClassicEditorUIView extends BoxedEditorUIView {
 		 */
 		this.toolbar = new StickyToolbarView( locale );
 
+		Template.extend( this.toolbar.template, {
+			attributes: {
+				class: 'ck-editor-toolbar'
+			}
+		} );
+
 		/**
 		 * Editable UI view.
 		 *

+ 4 - 0
packages/ckeditor5-editor-classic/tests/classiceditoruiview.js

@@ -24,6 +24,10 @@ describe( 'ClassicEditorUIView', () => {
 				expect( view.toolbar ).to.be.instanceof( StickyToolbarView );
 			} );
 
+			it( 'is given the right CSS class', () => {
+				expect( view.toolbar.element.classList.contains( 'ck-editor-toolbar' ) ).to.be.true;
+			} );
+
 			it( 'is given a locate object', () => {
 				expect( view.toolbar.locale ).to.equal( locale );
 			} );

+ 0 - 2
packages/ckeditor5-editor-classic/theme/theme.scss

@@ -13,8 +13,6 @@
 
 	.ck-editor__top {
 		.ck-toolbar {
-			@include ck-editor-toolbar();
-
 			border-top: 0;
 			border-left: 0;
 			border-right: 0;