Browse Source

Merge branch 'dev' of https://github.com/artf/grapesjs into dev

pull/5017/head
Artur Arseniev 4 years ago
parent
commit
700a555dd4
  1. 18
      index.d.ts
  2. 3
      src/rich_text_editor/model/RichTextEditor.ts

18
index.d.ts

@ -7,9 +7,10 @@ declare namespace Backbone {
collection: Collection<this>; collection: Collection<this>;
cid: string; cid: string;
get<K extends keyof T>(prop: K): T[K]; get<K extends keyof T>(prop: K): T[K];
set<K extends keyof T>(prop: K, val: T[K]): void; set<K extends keyof T>(prop: K, val: T[K], opt?: any): void;
defaults(): T; defaults(): T;
on(eventName: string, callback: (...args: any[]) => void): this; on(eventName: string, callback: (...args: any[]) => void): this;
off(eventName: string, callback: (...args: any[]) => void): this;
toJSON(options?: any): any; toJSON(options?: any): any;
} }
@ -725,6 +726,8 @@ declare namespace grapesjs {
model?: Component; model?: Component;
el?: HTMLElement; el?: HTMLElement;
}): void; }): void;
render(): void;
} }
interface View { } interface View { }
@ -4871,6 +4874,19 @@ declare namespace grapesjs {
* Get the toolbar element * Get the toolbar element
*/ */
getToolbarEl(): HTMLElement; getToolbarEl(): HTMLElement;
/**
* Retrieves the standard (non-custom) rich text editor
*/
globalRte?: RichTextEditor
/**
* Wrapper around [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) to allow
* you to perform operations like `insertText`
* @param {string} command Command name
* @param {any} [value=null Command's arguments
*/
exec(command: string, value: string);
} }
/** /**

3
src/rich_text_editor/model/RichTextEditor.ts

@ -355,7 +355,8 @@ export default class RichTextEditor {
} }
/** /**
* Execute the command * Wrapper around [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) to allow
* you to perform operations like `insertText`
* @param {string} command Command name * @param {string} command Command name
* @param {any} [value=null Command's arguments * @param {any} [value=null Command's arguments
*/ */

Loading…
Cancel
Save