Browse Source

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

up-docs
Artur Arseniev 11 months ago
parent
commit
243827ffef
  1. 2
      docs/api/block.md
  2. 2
      docs/api/component.md
  3. 2
      docs/api/sector.md
  4. 2
      docs/guides/Replace-Rich-Text-Editor.md
  5. 2
      packages/core/src/data_sources/model/conditional_variables/operators/LogicalOperator.ts
  6. 2
      packages/core/src/storage_manager/config/config.ts
  7. 2
      packages/core/test/specs/dom_components/model/Component.ts

2
docs/api/block.md

@ -5,7 +5,7 @@
### Properties
* `label` **[String][1]** Block label, eg. `My block`
* `content` **([String][1] | [Object][2])** The content of the block. Might be an HTML string or a [Component Defintion][3]
* `content` **([String][1] | [Object][2])** The content of the block. Might be an HTML string or a [Component Definition][3]
* `media` **[String][1]?** HTML string for the media/icon of the block, eg. `<svg ...`, `<img ...`, etc.
* `category` **[String][1]?** Block category, eg. `Basic blocks`
* `activate` **[Boolean][4]?** If true, triggers the `active` event on the dropped component.

2
docs/api/component.md

@ -27,7 +27,7 @@ component.get('tagName');
* `name` **[String][1]?** Name of the component. Will be used, for example, in Layers and badges
* `removable` **[Boolean][3]?** When `true` the component is removable from the canvas, default: `true`
* `draggable` **([Boolean][3] | [String][1] | [Function][4])?** Indicates if it's possible to drag the component inside others.
You can also specify a query string to indentify elements,
You can also specify a query string to identify elements,
eg. `'.some-class[title=Hello], [data-gjs-type=column]'` means you can drag the component only inside elements
containing `some-class` class and `Hello` title, and `column` components. In the case of a function, target and destination components are passed as arguments, return a Boolean to indicate if the drag is possible. Default: `true`
* `droppable` **([Boolean][3] | [String][1] | [Function][4])?** Indicates if it's possible to drop other components inside. You can use

2
docs/api/sector.md

@ -11,7 +11,7 @@
* `id` **[String][1]** Sector id, eg. `typography`
* `name` **[String][1]** Sector name, eg. `Typography`
* `open` **[Boolean][2]?** Indicates the open state.
* `properties` **[Array][3]<[Object][4]>?** Indicate an array of Property defintions.
* `properties` **[Array][3]<[Object][4]>?** Indicate an array of Property definitions.
### getId

2
docs/guides/Replace-Rich-Text-Editor.md

@ -90,7 +90,7 @@ editor.setCustomRte({
### Content
Each third-party library could handle the state of the content differently and what is actually rendered as a DOM in the preview might not rapresent the final HTML output. So, by default, GrapesJS takes the `innerHTML` as the final output directly from the DOM element but is highly recommended to specify the method responsable to return the final state as HTML string (each third-party library might handle it differently).
Each third-party library could handle the state of the content differently and what is actually rendered as a DOM in the preview might not rapresent the final HTML output. So, by default, GrapesJS takes the `innerHTML` as the final output directly from the DOM element but is highly recommended to specify the method responsible to return the final state as HTML string (each third-party library might handle it differently).
```js
editor.setCustomRte({

2
packages/core/src/data_sources/model/conditional_variables/operators/LogicalOperator.ts

@ -12,7 +12,7 @@ export class LogicalOperator extends Operator {
}
evaluate(statements: boolean[]): boolean {
if (!statements.length) throw new Error('Expected one or more statments, got none');
if (!statements.length) throw new Error('Expected one or more statements, got none');
switch (this.operator) {
case LogicalOperation.and:

2
packages/core/src/storage_manager/config/config.ts

@ -41,7 +41,7 @@ export interface StorageManagerConfig {
/**
* In case the `remote` storage is selected, and this options is enabled, the project
* will be stored on the `local` storage in case the remote one fails.
* The local data are cleared on every sucessful remote save. When the remote storage
* The local data are cleared on every successful remote save. When the remote storage
* fails (eg. network issue) and the editor is reloaded, a dialog with the possibility to
* recovery previous data will be shown.
* @default false

2
packages/core/test/specs/dom_components/model/Component.ts

@ -748,7 +748,7 @@ describe('Components', () => {
`;
const added = dcomp.addComponent(block) as Component;
const addComps = added.components();
// Let's check if everthing is working as expected
// Let's check if everything is working as expected
// 2 test components + 1 wrapper + 1 head + 1 docEl
expect(Object.keys(dcomp.componentsById).length).toBe(5);
expect(added.getId()).toBe(id);

Loading…
Cancel
Save