Selaa lähdekoodia

Changed: Bind 'insertTable' button to command.

Maciej Gołaszewski 7 vuotta sitten
vanhempi
commit
3ceacdf87c

+ 3 - 0
packages/ckeditor5-table/src/tableui.js

@@ -17,8 +17,11 @@ export default class TableUI extends Plugin {
 		const editor = this.editor;
 
 		editor.ui.componentFactory.add( 'insertTable', locale => {
+			const command = editor.commands.get( 'insertTable' );
 			const buttonView = new ButtonView( locale );
 
+			buttonView.bind( 'isEnabled' ).to( command );
+
 			buttonView.set( {
 				label: 'Insert table',
 				icon,

+ 1 - 1
packages/ckeditor5-table/tests/manual/table.js

@@ -13,7 +13,7 @@ ClassicEditor
 	.create( document.querySelector( '#editor' ), {
 		plugins: [ ArticlePluginSet, Table ],
 		toolbar: [
-			'headings', '|', 'insertTable', '|', 'bold', 'italic', 'undo', 'redo'
+			'headings', '|', 'insertTable', '|', 'bold', 'italic', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo'
 		]
 	} )
 	.then( editor => {