npm grapesjs 0.21.1
v0.21.1

latest releases: 0.22.3, 0.22.3-rc.0, 0.22.2...
19 months ago

⚠️ POSSIBLY BREAKING CHANGE

What's Changed

The biggest change we introduce with this release is the complete rewrite of modules to Typescript. This deprecates the old ./index.d.ts (manually updated) in favor of ./dist/index.d.ts (generated from the source).
So there are no real changes to the core API itself if not the new TS declaration file which includes type/interfaces changes in order to bring more naming consistency with the code.
This is how you might have used the import of types in the previous version:

import type grapesjs from 'grapesjs';

// plugin
const plugin: grapesjs.Plugin = function (editor: grapesjs.Editor, opt: ...) {...};

Now you can get types directly without specifying the grapesjs namespace (which is the most common way to import types):

import type { Editor, Plugin } from 'grapesjs';

// plugin
const plugin: Plugin = function (editor: Editor, opt: ...) {...};

Added

  • Added new noCustom option to Component.getName() in order to skip custom name assigned to the component.
  • Added rename method to SelectorManager
  • Added fetchOptions to AssetManager configs
  • Added options to ExportTemplate command

Fixed

Other

New Contributors

Full Changelog: v0.20.4...v0.21.1

Don't miss a new grapesjs release

NewReleases is sending notifications on new releases.