You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added findType, removeTrait, addTrait, updateTrait and getTraitIndex methods to Component
For more details about those methods check the Component API Reference
Added options argument to Editor.select method
The only available option for now is scroll, which allows you to scroll the canvas
to the selected component: editor.select(component, { scroll: true })
Added appendOnClick option (default false) to Blocks module #1951
This would allow appending blocks also on click, not only by drag & drop
Enable the possibility to accept components as a function
You can easily create components with dynamic default templates
domc.addType('some-type',{model: {defaults: {label: 'Value for some custom prop',// You can return an HTML string, Component object or // an array which mixes all of themcomponents: component=>`<div class="something">${this.get('label')} </div>`,}}});
Improved addType in Components module. Added extendFn and extendFnView options.
When you need to reuse functions, of the parent you're extending, generally what you do is this:
domc.addType('new-type',{extend: 'parent-type',model: {init(){domc.getType('parent-type').model.prototype.init.apply(this,arguments);// do something;},}});
Now you can do it faster by doing:
domc.addType('new-type',{extend: 'parent-type',extendFn: ['init'],// array of model functions to extendmodel: {init(){// do something;},}});
The same would be for the view by using extendFnView
Fixed
Scroll the RTE toolbar if the text component is bigger than the view. Closes #1980
Fix autosave issue in remote storage. Closes #1985
Avoid moving styles from Components to Rules. Fixes #1978
Store the last return of the stateful command
Make Layers more reliable and generally more aware of textnodes #1949