Skip to content

Releases: GrapesJS/grapesjs

v0.14.50

27 Dec 17:18
Compare
Choose a tag to compare

Docs

Changed

  • Improved the extension of components via DomComponents.addType
    Read more about this here
  • In isComponent is not necessary anymore to return the object with its type to accept it, any truthy value is enough.
// Before
isComponent: el => {
	if (el.tagName === 'SOME-TAG') {
		return { type: 'my-component' };
	}
}
// After
isComponent: el => el.tagName === 'SOME-TAG'
  • Add default attributes in the creation of new components
  • Emit component:clone event on the component which was cloned
  • Clear old attributes in updateAttributes
  • Don't trigger component hooks for temporary components
  • Improved the parserHtml

Added

  • Added getTypes method in DomComponents

v0.14.49

20 Dec 22:08
Compare
Choose a tag to compare

Import correctly ItemView. Fixes #1672

v0.14.48

20 Dec 01:37
Compare
Choose a tag to compare

Changed

  • Rename the event component:clone in PasteComponent to component:paste and add component:clone
    to the clone method in Component

Added

  • Added index method to the Component API
  • Make work the visible property in Panels. Closes #1602 by @arthuralmeidap
  • Add new hook methods to Component, updated and removed

Fixed

  • Avoid the delete of inputs on canc key. Fixes #1606
  • Take care of parenthesis when split CSS style values. Fixes #1579
  • Adjust the sorter placeholder when the parent has flex direction as column. Fixes #1626
  • Clear properly composite style properties. Fixes #1613
  • Check if fullscreen is active before running exitFullscreen. Fixes #1667

v0.14.43

21 Nov 23:57
Compare
Choose a tag to compare

Changed

  • Changed the method name in ComponentTextView: enableEditing -> onActive
  • Update Property (Style Manager), make the toRequire option, work also with IDs of the property

Added

  • Added target option in fullscreen command. Closes #1526 by @mcsekar12
  • Create PropertySelect in styleManager
  • Added component:create and component:mount events
  • Added removeAll method in Keymaps module

Fixed

  • Fix highlightable property in canvas
  • Load traits only if are not instance of Traits. Fixes #1563
  • Pass the correct model to component:styleUpdate event. Fixes #1575
  • Update correctly the text component on content change. Fixes #1511
  • Sort media queries in export code. Fixes #1506
  • Update how TextComponent handle children on change. Fixes #1593
  • Unbind all key shortcuts on destroy. Fixes #1501

Docs

  • Fix links in Blocks. Closes #1559

v0.14.40

30 Oct 01:07
Compare
Choose a tag to compare

Changed

  • Allow strings in upload function of component image #1462
  • Append external styles inside head instead of body #1473
  • Improved Style Manager for a better extensibility
  • Avoid adding styles for temporary components (eg. created when you drag blocks around the canvas)

Added

  • Accepts strings as argument for the assets callback in Style Manager. Closes #1457
  • Added valueTrue and valueFalse options to trait checkbox type. Closes #1424
    This feature allows you to customize the boolean attribute on components
    Example:
traits: [{
  type: 'checkbox',
  label: 'Show Name',
  name: 'show-name',
  valueTrue: 'TRUE-value',
  valueFalse: 'FALSE-value',
  // For default values you have to specify same true/false values
  // You can add `value` in trait or on your components
  value: 'FALSE-value',
}]
  • Added ComponentStyleClear command and style-signature option in Component
  • Added setTarget method in StyleManager
  • Added button trait type
  • Added styleManager:update:target event to track target changes (Component or CSSRule) in Style Manager
  • Added getTrait(traitName) method in Component
  • Added new methods in Editor: once, getWrapper
  • Added log option to the main config object

Fixed

  • Avoid removing component on selector editing
  • Store the wrapper if avoidInlineStyle is false #TODO issue in project
  • Return body selector, instead of #wrapper, for the wrapper when requested
  • Run npm start cross-platform. Closes #1456
  • Improve hover in SelectComponent command. Fixes #1448
  • Avoid errors in case of textnode selection
  • Fix duplicated CSS rules with at-rules. Closes #1513
  • Update traits when a component is removed. Fixes #1535

v0.14.33

20 Sep 20:54
Compare
Choose a tag to compare

Changed

  • Improved the Text component. Fixes #1394
  • Improved the Resizer, make it understand auto values. #1415 by @nojacko
  • Re-render buttons on change of any of its properties
  • Re-render blocks on change of any of its properties

Added

  • Added remove method in Component API
  • Added ComponentWrapper which might be used to help identify the wrapper via [data-gjs-type=wrapper]
  • Added component:update:components event, which allows listen to inner components changes. Closes #1409
  • Added the possibility to add custom CSS parsers, this will help to avoid inconsistency with built-in browser parsers.
  editor.setCustomParserCss(css => {
   const result = [];
   // ... parse the CSS string
   result.push({
     atRule: 'media',
     params: 'screen and (min-width: 480px)',
     selectors: '.someclass:hover, div .otherclass',
     style: { color: 'red' }
   })
   // ...
   return result;
  });

For an overview on how to built correctly rule objects check the guide here

  • Implemented a simple event-based log system, eg:
editor.log('Something done!', { ns: 'from-plugin-x', level: 'info' });
// This will trigger following events
// `log`, `log:info`, `log-from-plugin-x`, `log-from-plugin-x:info`
// Callbacks of those events will always receive the message and
// options, as arguments, eg:
// editor.on('log:info', (msg, opts) => console.info(msg, opts))
  • Enable the possibility to remove the selected link in RTE #1437 by @tabaliov

Fixed

  • Fixed default types in open-assets command. Closes #1411
  • Don't mess with onbeforeunload unless user wants to. #1417 by @dsgh
  • Fixed the class for disabled state of panel buttons. Closes #1421
  • Fixed the loading of component, accept also arrays and objects. Closes #1429
  • Fixed the initialization of checkbox traits. #1435
  • Fix name editing of layers, which was deleting components

v0.14.29

02 Sep 14:59
Compare
Choose a tag to compare

Added

  • Added touch support.
    In order to make it work properly on all touch devices, you have to use grapesjs-touch plugin, which just includes some essential polyfills (eg. native drag & drop). Big thanks go to @saltyfoam for funding this feature and @Unsigno who actually made the work. There are still few issues regarding some devices (probably not even related to the feature itself), but we hope to fix them soon

v0.14.27

26 Aug 12:33
Compare
Choose a tag to compare

Docs

Changed

  • Replace isInputFocused with isEditing in UndoManager
  • Clear traits values on init in Components
  • Now command's state (active or not) is tracked.
      const cm = editor.Commands;
      cm.run('preview');
      cm.isActive('preview');
      // -> true
      cm.stop('preview');
      cm.isActive('preview');
      // -> false

Added

  • Added the possibility to use plugins assigned in window. More on this
  • Added new methods to Commands API: getAll, isActive, getActive

Fixed

  • Fix the count of children in Layers
  • Pass always a numeric value to the slider property #1346
  • Don't display drop placeholder when no target #1361 (Thanks to @dsgh)
  • Adjust few commands for being traceable

v0.14.25

26 Jul 20:50
Compare
Choose a tag to compare

Bug fixes and API improvements

Changed

  • Adjust toolbar positioning on component change

Added

  • Added onActive method in ComponentView which executes on active event
  • Added the possibility to open the modal with title and content via options
    eg. editor.Modal.open({ title: 'Title', content: 'Content' })
  • Added the possibility to append label on component toolbar buttons
  • Added run and stop methods in Commands module

Fixed

  • Ensure the trait gets the initial value. Fixes #1290
  • Avoid canvas focus check in ComponentDelete command. Fixes #1298
  • Fix the open-assets call in Style Manager input (file type). Closes #1241

v0.14.23

15 Jul 22:45
Compare
Choose a tag to compare

Changed

  • Switched to Webpack v4, ⚠️ run npm i if you develop on GrapesJS
  • Don't output style declaration without value
  • Refactored Modal view

Added

  • Added core:component-delete to the keymap module
  • Added togglable option to Buttons, if it's false you can't turn off the button once enabled
  • Added documentation files in docs
  • Added youtube-nocookie.com as video provider #1270

Fixed

  • Show the id attribute for inline styled components. Fixes #1246
  • Call command events also when executed from buttons
  • Fixed IE11 blank page due to Array.from #1253