mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* TinyMCE typings * TinyMCE declaration file * Update tsconfig.json Changed `strictNullChecks` to true and added `noImplicitThis` * Update index.d.ts Added namespace * Update index.d.ts
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
// Type definitions for TinyMCE 4.5
|
|
// Project: https://github.com/tinymce/tinymce
|
|
// Definitions by: Martin Duparc <https://github.com/martinduparc/>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
// Work In Progress
|
|
|
|
declare namespace TinyMCE {
|
|
export interface Observable {
|
|
off: (name?: string, callback?: () => void) => any;
|
|
on: (name: string, callback: () => void) => any;
|
|
fire: (name: string, args?: any, bubble?: boolean) => Event;
|
|
}
|
|
|
|
export interface Editor extends Observable {
|
|
destroy: (automatic: boolean) => void;
|
|
remove: () => void;
|
|
hide: () => void;
|
|
show: () => void;
|
|
getContent: (args?: any) => string;
|
|
setContent: (content: string, args?: any) => string;
|
|
focus: (skip_focus?: boolean) => void;
|
|
undoManager: UndoManager;
|
|
settings: any;
|
|
getDoc: () => Document;
|
|
editorUpload: any;
|
|
}
|
|
|
|
export interface UndoManager {
|
|
undo: () => any;
|
|
clear: () => void;
|
|
hasUndo: () => boolean;
|
|
}
|
|
|
|
export interface Static extends Observable {
|
|
init: (settings: any) => void;
|
|
execCommand: (c: string, u: boolean, v: string) => boolean;
|
|
activeEditor: Editor;
|
|
get: (id: string) => Editor;
|
|
triggerSave: () => void;
|
|
}
|
|
}
|
|
|
|
declare var tinymce: TinyMCE.Static;
|