diff --git a/docs/api/components.md b/docs/api/components.md index 0f92b2134..80622ff9b 100644 --- a/docs/api/components.md +++ b/docs/api/components.md @@ -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 definition, eg. `{ model: ..., view: ... }` ## removeType diff --git a/docs/modules/Commands.md b/docs/modules/Commands.md index 93078e8ac..697a0a0e4 100644 --- a/docs/modules/Commands.md +++ b/docs/modules/Commands.md @@ -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 previously created `my-command-modal` command let's see which events we can listen to ```js editor.on('run:my-command-modal', () => { diff --git a/docs/modules/Components.md b/docs/modules/Components.md index d84e1029d..41c5649f1 100644 --- a/docs/modules/Components.md +++ b/docs/modules/Components.md @@ -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, instead of writing this: ```js // I'm adding a string, so the parsing and the component recognition steps will be executed editor.addComponents(`
diff --git a/src/dom_components/config/config.js b/src/dom_components/config/config.js index a14506818..cc895ee7c 100644 --- a/src/dom_components/config/config.js +++ b/src/dom_components/config/config.js @@ -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 definition 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 diff --git a/src/dom_components/index.js b/src/dom_components/index.js index 99693f173..0545a29b9 100644 --- a/src/dom_components/index.js +++ b/src/dom_components/index.js @@ -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 definition, eg. `{ model: ..., view: ... }` */ getType(type) { var df = componentTypes; diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index 70aa0eb01..03d980dce 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -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 previously // created symbols (eg. used mainly when drag components around) toUp.forEach(symb => { const symbTop = symb.__getSymbTop(); diff --git a/src/navigator/config/config.js b/src/navigator/config/config.js index 7a4992e79..36a95ae76 100644 --- a/src/navigator/config/config.js +++ b/src/navigator/config/config.js @@ -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 scrolling scrollCanvas: { behavior: 'smooth', block: 'nearest' }, // Scroll to selected component in Layers when it's selected in Canvas diff --git a/src/storage_manager/config/config.js b/src/storage_manager/config/config.js index a2ac50f50..3f1ce08c2 100644 --- a/src/storage_manager/config/config.js +++ b/src/storage_manager/config/config.js @@ -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 which returns and object to add: // currentOpts => { // return currentOpts.method === 'post' ? { method: 'patch' } : {}; // } diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index dcc6ba5bb..b4b6c6573 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -854,7 +854,7 @@ export default Backbone.View.extend({ /** * Get children dimensions * @param {HTMLELement} el Element root - * @retun {Array} + * @return {Array} * */ getChildrenDim(trg) { const dims = []; @@ -920,7 +920,7 @@ export default Backbone.View.extend({ * @param {Array} dims Dimensions of nodes to parse * @param {number} posX X coordindate * @param {number} posY Y coordindate - * @retun {Object} + * @return {Object} * */ findPosition(dims, posX, posY) { var result = { index: 0, indexEl: 0, method: 'before' }; diff --git a/test/specs/grapesjs/index.js b/test/specs/grapesjs/index.js index bc2a09e49..7c2a3ce8c 100644 --- a/test/specs/grapesjs/index.js +++ b/test/specs/grapesjs/index.js @@ -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 multiple editor.selectAdd([el2, el3]); expect(editor.getSelected()).toBe(el3); expect(editor.getSelectedAll().length).toBe(3);