Skip to content

Releases: GrapesJS/grapesjs

v0.18.3

15 Feb 14:36
Compare
Choose a tag to compare

Added

  • Add new wrap action to default RTE.
  • Added isInstanceOf, isChildOf methods to Component.
  • Added component:select:before, component:hover:before events.
    These could be used to prevent some components from being selected/hovered.
editor.on('component:select:before component:hover:before', (cmp, opts) => {
  if (['b', 'i', 'u'].indexOf(cmp.get('tagName')) >= 0) {
    opts.abort = true;
  }
});

Changed

  • Avoid JS output if component script function is empty #4140

Fixed

  • Fixed textable components #2771
  • Fixed toolbar position on undo/redo.
  • Avoid selected text HTML5 D&D with draggableComponents disabled #4099
  • Fixed sector and property visibility update in Style Manager #4116
  • Trigger component:mount once the DOM is appended to the parent #4136

v0.18.2 - Security fixes

27 Jan 13:54
Compare
Choose a tag to compare

Added

  • Added Component.getInnerHTML method.
  • Added withProps and altQuoteAttr options to Component.toHTML method.
  • Added onlyMatched option to CSS code generator.
  • Added new options to editor.Parser.parseHtml.
  • Added config.parser.optionsHtml configuration options.

Changed

  • Make the component resize command more extendable #4097
  • Deprecated config.allowScripts in favor of config.parser.optionsHtml.allowScripts.
    ⚠️ As before, config.parser.optionsHtml.allowScripts is false by default but now we also remove unsafe attributes from parsed HTML (eg. on* inline event handlers). In case you need to enable unsafe attributes, you can do it via config.parser.optionsHtml.allowUnsafeAttr option.

Fixed

  • Fix XSS in ClassTagsView #4076
  • Fix external D&D for Image components #4094

v0.18.1

17 Jan 21:44
Compare
Choose a tag to compare

⚠️ BREAKING CHANGE
This release refactors heavily the Style Manager module by removing private methods and events on which some old plugins were relying, like grapesjs-style-gradient, grapesjs-style-filter and grapesjs-style-bg (they won't work properly with this version until their update).
This change was necessary in order to improve the stability of the module and enable higher customizability.
If you have any customization based on GrapesJS Style Manager, please refer to the new API methods/events here: https://grapesjs.com/docs/api/style_manager.html

Docs

  • New Style Manager module page
  • Moved all available module events to their relative pages.
  • Added Property, PropertyNumber, PropertySelect, PropertyComposite, PropertyStack, Layer in API StyleManager Reference.

Added

  • Added getDevice, getState, getComponent methods to CssRule.
  • Added getTraits/setTraits to Component API.
  • Added messagesAdd option in I18n module.
  • Now you can get/add/update builtIn properties via Style Manager API.

Changed

  • Improve check for layer visibility #4010
  • Enable styleManagerConfig.clearProperties by default.
  • Adjust draggable Component property to accept function.

Fixed

  • Fixed asset upload events #3934
  • Fixed the scroll option for the current frame when requested #3938
  • Fixed color input trait #3931
  • Adjust position in Absolute Mode for children #3770
  • Allow for the title of a block to be passed as an attribute #3992
  • Disable pointer events from block labels #3986
  • Avoid errors on paste in root #4000
  • Fixed devices select padding #4026
  • Fixed editor.destroy with selected components #2681
  • Update Layer name on the component name change.

v0.17.29

04 Nov 11:55
Compare
Choose a tag to compare

v0.17.28

29 Oct 11:39
Compare
Choose a tag to compare

Docs

Added

Fixed

v0.17.27

05 Oct 15:04
Compare
Choose a tag to compare

Docs

Added

Changed

Fixed

  • Fixed CssComposer add/get methods
  • Fixed default render of modules containing appendTo #3835

v0.17.26

23 Sep 10:46
Compare
Choose a tag to compare

Docs

  • Added Modal module documentation.
  • Added Asset model documentation.
  • Improved Modal API documentation.
  • Improved Assets module documentation.

Added

  • Support custom Modal with the new config.modal.custom option.
    More about this here.
  • Added modal catch-all event to Modal module.
  • Support custom AssetManager with the new config.assetManager.custom option.
    More about this here.
  • Added open and close methods to AssetManager.
  • Added getType and getSrc methods to Asset class.

Fixed

  • Fixed rendering issue with custom traits #3735

v0.17.25

25 Aug 19:43
Compare
Choose a tag to compare

Docs

Added

  • Added headless option in order to use GrapesJS in Nodejs.
    Not all the API are supported: #3672
  • Added canvas.getCoords and canvas.setCoords methods #3668
  • Added default device option in deviceManager configuration #3679
  • Added onClick property to Block
  • Allow Content-Security-Policy without unsafe eval #3558

Fixed

  • Fix default color in ColorPicker #3670
  • Sync text component before store #3615
  • Make asset selection more consistent #3613
  • Fix badge positioning #3675
  • Fix absolute mode positioning #2547

v0.17.22

02 Aug 19:39
Compare
Choose a tag to compare

Added

  • Allow exporting CSS rules from code manager by using json option.
    editor.CodeManager.getCode(component, 'css', { json: 1 })
  • Generate CSS code from the array of rules in code manager.
    editor.CodeManager.getCode(null, 'css', { rules: [...] })
  • Added editor.addStyle method
  • Added editor.getEditing method

Fixed

  • Fix error when adding iframe as HTML code #3575
  • Fix activatable blocks on drop #3579
  • Don't escape textnodes in script components #3620
  • Escape asset rendering #3596
  • Update style manager properties on dragMode change #2374

v0.17.19

23 Jun 22:44
Compare
Choose a tag to compare

Added

  • Added iframe component #3491
  • Allow editing iframe content before load #3285

Changed

  • Deprecated style-signature Component property

Fixed

  • Fixed button trait type #3497
  • Fixed errors on page remove
  • Avoid unselectable components in component-enter command #3511
  • Fixed default command run post frame load #3475
  • Fixed conflicts in RTE with multiple editor instances #3475
  • Fixed layers visibility change #3508