Browse Source

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

pull/4891/head
Artur Arseniev 3 years ago
parent
commit
05d2c8eaee
  1. 2
      docs/modules/Components.md
  2. 7
      index.d.ts
  3. 2
      src/block_manager/index.ts

2
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 `<input/>` doesn't need it) might be `components`, which defines default internal components
One another important property (not used in our input component integration because `<input/>` doesn't need it) might be `components`, which defines default internal components
```js
defaults: {

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