Releases: GrapesJS/grapesjs
Releases · GrapesJS/grapesjs
v0.18.3
Added
- Add new
wrap
action to default RTE. - Added
isInstanceOf
,isChildOf
methods toComponent
. - 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
v0.18.2 - Security fixes
Added
- Added
Component.getInnerHTML
method. - Added
withProps
andaltQuoteAttr
options toComponent.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 ofconfig.parser.optionsHtml.allowScripts
.
⚠️ As before,config.parser.optionsHtml.allowScripts
isfalse
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 viaconfig.parser.optionsHtml.allowUnsafeAttr
option.
Fixed
v0.18.1
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 toCssRule
. - 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
v0.17.28
Docs
- Added SelectorManager module documentation
- Added Selector API documentation
- Added State API documentation
- Improved SelectorManager API documentation
Added
- Added new methods to SelectorManager API
- Added new methods to Selector API
- Added
getChildAt(index)
andgetLastChild
to Component API - Track component Selectors in UndoManager #3879
Fixed
- Fixed SVG parsing #3866
- Fixed next/prev selection #3861
- Fixed color picker input update with missing hex #3883
- Fixed headless option #3672 (reply in thread)
v0.17.27
Docs
- Updated Blocks module documentation.
- Updated CSSRule model documentation.
- Added Components & CSS section.
- Added Frame model documentation.
Added
- Added
getAllWrapper
method to Pages API. - Added
remove
andaddRules
methods to CssComposer API. - Added
onReady
method to Editor instance. - Added support for component related styles.
- Added support for custom Block Manager with the new
config.blockManager.custom
option. More about this here.
Changed
Fixed
- Fixed CssComposer add/get methods
- Fixed default render of modules containing
appendTo
#3835
v0.17.26
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
andclose
methods to AssetManager. - Added
getType
andgetSrc
methods to Asset class.
Fixed
- Fixed rendering issue with custom traits #3735
v0.17.25
Docs
- Added Parser API Reference
- Added CssRule API Reference
- Added Block API Reference
- Added Device API Reference
- Updated Devices API Reference
Added
- Added
headless
option in order to use GrapesJS in Nodejs.
Not all the API are supported: #3672 - Added
canvas.getCoords
andcanvas.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
v0.17.22
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
v0.17.19
Added
Changed
- Deprecated
style-signature
Component property