npm grapesjs 0.14.21
v0.14.21

latest releases: 0.21.10, 0.21.9, 0.21.8...
5 years ago

Changed

  • Listen for content changes inside ComponentView
  • Enabled block:drag:* events when HTML5 Drag&Drop is used

Added

  • Added setOptions, addOption and getOptions to select property in Style Manager #1215
  • Added the possibility to output custom attributes in toHTML method
  • Added the possibility to avoid clearing styles in CSS export
  • Added stopPropagation in ComponentTextView on dblclick event
  • Added activate and select options to Block models
  • Added onAll method to Component model. Executes a callback on any inner component
  • Added resetId method on Component and resetId propperty on Block model
    This allows to reset id of the component and its binded css rules.
    This comes handy when you use ids inside you blocks
    <div id="some-id"></div>
    <style>
      #some-id {
        ...
      }
    </style>
    Technically speaking, Blocks are reusable and IDs are not, so this will cause a problem.
    So with this new option, IDs will be changed automatically inside all dropped components
    blockManager.add('some-block', {
      resetId: true,
      content: `<div>...`
    })

Fixed

  • Trigger end move for all dropped models. Closes #1196
  • Don't trigger component:remove when a component is just deselected. Fixes #1219

Don't miss a new grapesjs release

NewReleases is sending notifications on new releases.