From 21a7316e6f540c125ca09dc129fb55991c3afd81 Mon Sep 17 00:00:00 2001 From: Hikariii Date: Tue, 29 Aug 2017 13:15:49 +0200 Subject: [PATCH] instance events updated and fixed --- types/ckeditor/ckeditor-tests.ts | 82 ++++++++++++++++++++++++++++++++ types/ckeditor/index.d.ts | 11 +++-- 2 files changed, 89 insertions(+), 4 deletions(-) diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index 289e97168a..b6471ddab6 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -407,3 +407,85 @@ function test_sharedSpace() { function test_specifying_editor_path() { window.CKEDITOR_BASEPATH = '/ckeditor/'; } + +function test_editor_instance_event() { + var textarea = document.createElement('textarea'); + var instance = CKEDITOR.replace(textarea, { + on: { + activeEnterModeChange: function() {}, + activeFilterChange: function() {}, + afterCommandExec: function() {}, + afterInsertHtml: function() {}, + afterPaste: function() {}, + afterPasteFromWord: function() {}, + afterSetData: function() {}, + afterUndoImage: function() {}, + ariaEditorHelpLabel: function() {}, + ariaWidget: function() {}, + autogrow: function() {}, + beforeCommandExec: function() {}, + beforeDestroy: function() {}, + beforeModeUnload: function() {}, + beforeSetMode: function() {}, + beforeUndoImage: function() {}, + blur: function() {}, + change: function() {}, + configLoaded: function() {}, + contentDirChanged: function() {}, + contentDom: function() {}, + contentDomInvalidated: function() {}, + contentDomUnload: function() {}, + customConfigLoaded: function() {}, + dataFiltered: function() {}, + dataReady: function() {}, + destroy: function() {}, + dialogHide: function() {}, + dialogShow: function() {}, + dirChanged: function() {}, + doubleclick: function() {}, + dragend: function() {}, + dragstart: function() {}, + drop: function() {}, + elementsPathUpdate: function() {}, + fileUploadRequest: function() {}, + fileUploadResponse: function() {}, + floatingSpaceLayout: function() {}, + focus: function() {}, + getData: function() {}, + getSnapshot: function() {}, + insertElement: function() {}, + insertHtml: function() {}, + insertText: function() {}, + instanceReady: function() {}, + key: function() {}, + langLoaded: function() {}, + loadSnapshot: function() {}, + loaded: function() {}, + lockSnapshot: function() {}, + maximize: function() {}, + menuShow: function() {}, + mode: function() {}, + notificationHide: function() {}, + notificationShow: function() {}, + notificationUpdate: function() {}, + paste: function() {}, + pasteFromWord: function() {}, + pluginsLoaded: function() {}, + readOnly: function() {}, + removeFormatCleanup: function() {}, + required: function() {}, + resize: function() {}, + save: function() {}, + saveSnapshot: function() {}, + selectionChange: function() {}, + setData: function() {}, + stylesSet: function() {}, + template: function() {}, + toDataFormat: function() {}, + toHtml: function() {}, + unlockSnapshot: function() {}, + updateSnapshot: function() {}, + widgetDefinition: function() {} + } + }); +} diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index c158678c6e..24ff341b38 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -1163,6 +1163,7 @@ declare namespace CKEDITOR { afterCommandExec?: (evt: CKEDITOR.eventInfo) => void; afterInsertHtml?: (evt: CKEDITOR.eventInfo) => void; afterPaste?: (evt: CKEDITOR.eventInfo) => void; + afterPasteFromWord?: (evt: CKEDITOR.eventInfo) => void; afterSetData?: (evt: CKEDITOR.eventInfo) => void; afterUndoImage?: (evt: CKEDITOR.eventInfo) => void; ariaEditorHelpLabel?: (evt: CKEDITOR.eventInfo) => void; @@ -1170,9 +1171,11 @@ declare namespace CKEDITOR { autogrow?: (evt: CKEDITOR.eventInfo) => void; beforeCommandExec?: (evt: CKEDITOR.eventInfo) => void; + beforeDestroy?: (evt: CKEDITOR.eventInfo) => void; beforeGetData?: (evt: CKEDITOR.eventInfo) => void; - beforeModuleUnload?: (evt: CKEDITOR.eventInfo) => void; + beforeModeUnload?: (evt: CKEDITOR.eventInfo) => void; beforeSetMode?: (evt: CKEDITOR.eventInfo) => void; + beforeUndoImage?: (evt: CKEDITOR.eventInfo) => void; blur?: (evt: CKEDITOR.eventInfo) => void; change?: (evt: CKEDITOR.eventInfo) => void; @@ -1189,7 +1192,7 @@ declare namespace CKEDITOR { dialogHide?: (evt: CKEDITOR.eventInfo) => void; dialogShow?: (evt: CKEDITOR.eventInfo) => void; dirChanged?: (evt: CKEDITOR.eventInfo) => void; - doubleckick?: (evt: CKEDITOR.eventInfo) => void; + doubleclick?: (evt: CKEDITOR.eventInfo) => void; dragend?: (evt: CKEDITOR.eventInfo) => void; dragstart?: (evt: CKEDITOR.eventInfo) => void; drop?: (evt: CKEDITOR.eventInfo) => void; @@ -1207,7 +1210,7 @@ declare namespace CKEDITOR { insertElement?: (evt: CKEDITOR.eventInfo) => void; insertHtml?: (evt: CKEDITOR.eventInfo) => void; insertText?: (evt: CKEDITOR.eventInfo) => void; - insanceReady?: (evt: CKEDITOR.eventInfo) => void; + instanceReady?: (evt: CKEDITOR.eventInfo) => void; key?: (evt: CKEDITOR.eventInfo) => void; @@ -1224,6 +1227,7 @@ declare namespace CKEDITOR { notificationUpdate?: (evt: CKEDITOR.eventInfo) => void; paste?: (evt: CKEDITOR.eventInfo) => void; + pasteFromWord?: (evt: CKEDITOR.eventInfo) => void; pluginsLoaded?: (evt: CKEDITOR.eventInfo) => void; readOnly?: (evt: CKEDITOR.eventInfo) => void; @@ -1851,4 +1855,3 @@ declare namespace CKEDITOR { function detect(defaultLanguage: string, probeLanguage: string): string; } } -