v0.14.21
Changed
- Listen for
content
changes inside ComponentView - Enabled
block:drag:*
events when HTML5 Drag&Drop is used
Added
- Added
setOptions
,addOption
andgetOptions
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 ondblclick
event - Added
activate
andselect
options to Block models - Added
onAll
method to Component model. Executes a callback on any inner component - Added
resetId
method on Component andresetId
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 blocksTechnically speaking, Blocks are reusable and IDs are not, so this will cause a problem.<div id="some-id"></div> <style> #some-id { ... } </style>
So with this new option, IDs will be changed automatically inside all dropped componentsblockManager.add('some-block', { resetId: true, content: `<div>...` })