Browse Source

types fix (#4886)

type fix

Co-authored-by: Julia Alberici <julia.alberici@korp.com.br>
Co-authored-by: Artur Arseniev <artur.catch@hotmail.it>
pull/4891/head
Julia Alberici 3 years ago
committed by GitHub
parent
commit
a1b54fc406
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      index.d.ts
  2. 2
      src/block_manager/index.ts

7
index.d.ts

@ -68,7 +68,7 @@ declare namespace grapesjs {
fromElement?: boolean;
/** Show an alert before unload the page with unsaved changes */
noticeOnUnload?: number;
noticeOnUnload?: number | boolean;
/** Show paddings and margins */
showOffsets?: boolean;
@ -425,11 +425,13 @@ declare namespace grapesjs {
showComputed?: boolean;
clearProperties?: boolean;
avoidComputed?: Array<string>;
custom?: boolean;
}
interface BlockManagerConfig {
appendTo?: HTMLElement | string;
blocks: Array<object>;
custom?: boolean;
}
interface RichTextEditorConfig {
@ -1309,7 +1311,8 @@ declare namespace grapesjs {
| 'block:remove'
| 'block:drag:start'
| 'block:drag'
| 'block:drag:stop';
| 'block:drag:stop'
| 'block:custom';
type AssetEvent =
| 'asset:add'

2
src/block_manager/index.ts

@ -55,7 +55,7 @@ import { ItemManagerModule } from '../abstract/Module';
import EditorModel from '../editor/model/Editor';
import Component from '../dom_components/model/Component';
export type BlockEvent = 'block:add' | 'block:remove' | 'block:drag:start' | 'block:drag' | 'block:drag:stop';
export type BlockEvent = 'block:add' | 'block:remove' | 'block:drag:start' | 'block:drag' | 'block:drag:stop' | 'block:custom';
export const evAll = 'block';
export const evPfx = `${evAll}:`;

Loading…
Cancel
Save