diff --git a/docs/modules/Components.md b/docs/modules/Components.md index 41c5649f1..76fe0da2f 100644 --- a/docs/modules/Components.md +++ b/docs/modules/Components.md @@ -365,7 +365,7 @@ The `model` is probably the one you'll use the most as is what is used for the d The model defines also what you will see as the resultant HTML (the export code) and you've probably noticed the use of `tagName` (if not specified the `div` will be used) and `attributes` properties on the model. -One another important property (not used because `` doesn't need it) might be `components`, which defines default internal components +One another important property (not used in our input component integration because `` doesn't need it) might be `components`, which defines default internal components ```js defaults: { diff --git a/index.d.ts b/index.d.ts index 1eb21bfc8..919c6edf4 100644 --- a/index.d.ts +++ b/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; + custom?: boolean; } interface BlockManagerConfig { appendTo?: HTMLElement | string; blocks: Array; + 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' diff --git a/src/block_manager/index.ts b/src/block_manager/index.ts index c9abd5daa..b0b3266be 100644 --- a/src/block_manager/index.ts +++ b/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}:`;