Browse Source
Merge pull request #3905 from timgates42/bugfix_typos
docs: Fix a few typos
pull/3934/head
Artur Arseniev
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with
11 additions and
11 deletions
docs/api/components.md
docs/modules/Commands.md
docs/modules/Components.md
src/dom_components/config/config.js
src/dom_components/index.js
src/dom_components/model/Component.js
src/navigator/config/config.js
src/storage_manager/config/config.js
src/utils/Sorter.js
test/specs/grapesjs/index.js
@ -179,7 +179,7 @@ Read more about this in [Define New Component][17]
* `type` ** [string][15]** Component ID
Returns ** [Object][12]** Component type defintion, eg. `{ model: ..., view: ... }`
Returns ** [Object][12]** Component type defini tion, eg. `{ model: ..., view: ... }`
## removeType
@ -264,7 +264,7 @@ The Commands module offers also a set of events that you can use to intercept th
### Intercept run and stop
By using our previosly created `my-command-modal` command let's see which events we can listen to
By using our previou sly created `my-command-modal` command let's see which events we can listen to
```js
editor.on('run:my-command-modal', () => {
@ -872,7 +872,7 @@ If you want to know how to create Components with javascript attached (eg. count
If you're importing big chunks of HTML string into the editor (eg. defined via Blocks) JSX might be a great compromise between perfomances and code readibility as it allows you to skip the parsing and the component recognition steps by keeping the HTML syntax.
By default, GrapesJS understands objects generated from React JSX preset, so, if you're working in the React app probably you're already using JSX and you don't need to do anything else, your environment is already configured to parse JSX in javascript files.
So, intead of writing this:
So, ins tead of writing this:
```js
// I'm adding a string, so the parsing and the component recognition steps will be executed
editor.addComponents(`< div >
@ -15,7 +15,7 @@ export default {
storeWrapper : 0 ,
/ * *
* You can setup a custom component definiton processor before adding it into the editor .
* You can setup a custom component definiti on processor before adding it into the editor .
* It might be useful to transform custom objects ( es . some framework specific JSX ) to GrapesJS component one .
* This custom function will be executed on ANY new added component to the editor so make smart checks / conditions
* to avoid doing useless executions
@ -564,7 +564,7 @@ export default () => {
* Get component type .
* Read more about this in [ Define New Component ] ( https : //grapesjs.com/docs/modules/Components.html#define-new-component)
* @ param { string } type Component ID
* @ return { Object } Component type defintion , eg . ` { model: ..., view: ... } `
* @ return { Object } Component type defini tion , eg . ` { model: ..., view: ... } `
* /
getType ( type ) {
var df = componentTypes ;
@ -850,7 +850,7 @@ export default class Component extends Model.extend(Styleable) {
addedInstances : addedInstances . map ( c => c . cid ) ,
added : m . cid
} ) ;
// Here, before appending a new symbol, I have to ensure there are no previosly
// Here, before appending a new symbol, I have to ensure there are no previou sly
// created symbols (eg. used mainly when drag components around)
toUp . forEach ( symb => {
const symbTop = symb . __ getSymbTop ( ) ;
@ -26,7 +26,7 @@ export default {
// Scroll to selected component in Canvas when it's selected in Layers
// true, false or `scrollIntoView`-like options,
// `block: 'nearest'` avoids the issue of window scolling
// `block: 'nearest'` avoids the issue of window scr olling
scrollCanvas : { behavior : 'smooth' , block : 'nearest' } ,
// Scroll to selected component in Layers when it's selected in Canvas
@ -59,7 +59,7 @@ export default {
// Pass custom options to fetch API (remote storage)
// You can pass a simple object: { someOption: 'someValue' }
// or a function wich returns and object to add:
// or a function wh ich returns and object to add:
// currentOpts => {
// return currentOpts.method === 'post' ? { method: 'patch' } : {};
// }
@ -854,7 +854,7 @@ export default Backbone.View.extend({
/ * *
* Get children dimensions
* @ param { HTMLELement } el Element root
* @ retu n { Array }
* @ retur n { Array }
* * /
getChildrenDim ( trg ) {
const dims = [ ] ;
@ -920,7 +920,7 @@ export default Backbone.View.extend({
* @ param { Array < Array > } dims Dimensions of nodes to parse
* @ param { number } posX X coordindate
* @ param { number } posY Y coordindate
* @ retu n { Object }
* @ retur n { Object }
* * /
findPosition ( dims , posX , posY ) {
var result = { index : 0 , indexEl : 0 , method : 'before' } ;
@ -506,7 +506,7 @@ describe('GrapesJS', () => {
editor . selectToggle ( [ el1 , el2 , el3 ] ) ;
expect ( editor . getSelected ( ) ) . toBe ( el2 ) ;
expect ( editor . getSelectedAll ( ) . length ) . toBe ( 2 ) ;
// Add mutiple
// Add mul tiple
editor . selectAdd ( [ el2 , el3 ] ) ;
expect ( editor . getSelected ( ) ) . toBe ( el3 ) ;
expect ( editor . getSelectedAll ( ) . length ) . toBe ( 3 ) ;