mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 20:21:46 +00:00
CKEditor: add properties in buttonDefinition (#13636)
* CKEditor add icon in buttonDefinition Add icon and iconOffset optional properties in buttonDefinition interface * Test Add test * Confirm to style
This commit is contained in:
@@ -270,6 +270,32 @@ function test_dom_window() {
|
||||
alert(size.height);
|
||||
}
|
||||
|
||||
function test_adding_command_and_buttons() {
|
||||
var textarea = document.createElement('textarea');
|
||||
var instance = CKEDITOR.replace(textarea);
|
||||
|
||||
instance.addCommand( 'aCommand', {
|
||||
exec: function( editor: CKEDITOR.editor ) {
|
||||
// empty logic
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
instance.ui.addButton( 'firstButton', {
|
||||
icon: 'http://www.example.com/assets/images/icons.png',
|
||||
iconOffset: -32,
|
||||
label: 'Label 1',
|
||||
command: 'aCommand',
|
||||
toolbar: 'tools'
|
||||
});
|
||||
|
||||
instance.ui.addButton( 'secondButton', {
|
||||
label: 'Label 2',
|
||||
command: 'aCommand',
|
||||
toolbar: 'tools'
|
||||
});
|
||||
}
|
||||
|
||||
function test_adding_dialog_by_path() {
|
||||
CKEDITOR.dialog.add( 'abbrDialog', this.path + 'dialogs/abbr.js' );
|
||||
}
|
||||
|
||||
Vendored
+2
@@ -1255,6 +1255,8 @@ declare namespace CKEDITOR {
|
||||
}
|
||||
|
||||
interface buttonDefinition {
|
||||
icon?: string;
|
||||
iconOffset?: number;
|
||||
label : string;
|
||||
command : string;
|
||||
toolbar : string;
|
||||
|
||||
Reference in New Issue
Block a user