Added
- Added root options
optsHtml and optsCss, in order to pass them as default to editor.toHtml() and editor.toCss() (eg. used already in the export code and the Storage)
- Added
cleanId option to editor.getHtml in order to remove unnecessary IDs (eg. those created automatically)
- Added
Component.removeAttributes method
- Added
options as a second argument to the Component.components() method
- Added
ComponentView.onAttrUpdate callback
- Added
component:remove:before event. This allows to put conditions before deleting a component
editor.on('component:remove:before', function(component, remove, opts) {
if (component.is('my-custom-type')) {
opts.abort = true; // This will abort the remove
// Pseudo-code of some modal/dialog
yourAsyncDialog('Are you sure?', {
confirmed: () => remove(), // complete the remove
});
}
});
Changed
- Skip the CSSRule from the JSON if there is no
style
- Avoid rendering
content if the component has children components
Fixed
- Fixed useless updates in
component.addAttributes
- Defer SelectComponent in order to prevent canvas "freeze" #2692
- Make the Droppable end event more reliable
- Hide toolbars properly
- Pass properly options in setStyle #3176
- Trigger the counter change on text update #3224
- Fixed Sorter errors and moved them in the warning logs
- Avoid dropping non-selectable and non-editable text nodes inside the editor