Przeglądaj źródła

Merge pull request #4 from ckeditor/t/ckeditor5-utils/33

Changed config getter.
Piotrek Koszuliński 9 lat temu
rodzic
commit
01de05b825

+ 4 - 2
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -61,8 +61,10 @@ export default class ClassicEditorUI extends BoxedEditorUI {
 	 * @inheritDoc
 	 */
 	init() {
-		if ( this.editor.config.toolbar ) {
-			this.toolbar.addButtons( this.editor.config.toolbar );
+		const toolbar = this.editor.config.get( 'toolbar' );
+
+		if ( toolbar ) {
+			this.toolbar.addButtons( toolbar );
 		}
 
 		return super.init();