Free and Open source Web Builder Framework. Next generation tool for building templates without coding
BSD-3-CLAUSE License
Bot releases are hidden (Show)
Published by artf over 4 years ago
closestType
and empty
methods to Component APIdisable
property to the BlockDomComponents
-> Components
LayerManager
-> Layers
CssComposer
-> Css
StorageManager
-> Storage
AssetManager
-> Assets
BlockManager
-> Blocks
TraitManager
-> Traits
SelectorManager
-> Selectors
StyleManager
-> Styles
DeviceManager
-> Devices
config.undoManager.maximumStackLength
option on initPublished by artf over 4 years ago
__
prefix)prepend
option to the stack style manager typePublished by artf over 4 years ago
style:update
and style:update:{property}
events for StyleManagercomponent:drag
events #2500svg-in
component to handle better inner SVG elementscomponent:drag
events in Layers #2528config.assetManager.showUrlInput
option. by @jcamejo https://github.com/artf/grapesjs/pull/2602
Published by artf almost 5 years ago
config.selectorManager
and the component-first selection via config.selectorManager.componentFirst
option https://github.com/artf/grapesjs/pull/2474
state
option in RTE actions to enable custom checks for enabling/disabling action buttons. Thanks @adriangroch https://github.com/artf/grapesjs/pull/2429
custom-name
property on layer name editlayerable
changes #2433<body>
when config.exportWrapper
option is used #2096editor.destroy
is called #2469Published by artf almost 5 years ago
cssIcons
option #644canvas:drop
#2396target
trait #2411Published by artf about 5 years ago
config.avoidInlineStyle
true by defaultconfig.styleManager.textLayer
option #2246Published by artf about 5 years ago
⚠️ POSSIBLY BREAKING CHANGE
config.wrappesIsBody
-> config.wrapperIsBody
@jcamejo https://github.com/artf/grapesjs/pull/2222
avoidDefaults
true by defaultat
option to addProperty
method in StyleManager #2213config.assetManager.beforeUpload
callback option (thanks to @tliscomb) https://github.com/artf/grapesjs/pull/2227
Published by artf about 5 years ago
⚠️ POSSIBLY BREAKING CHANGE
editor.addComponents
now returns always an array of added components. So, if you ever used its result like this:
const component = editor.addComponents('<div>...');
now it should be
const component = editor.addComponents('<div>...')[0];
script
prop updateeditor.addComponents(<div>Hello JSX</div>)
to add components. JSX helps the editor in performances as it skips the parsing of an HTML string but keeps the readability of your code.processor
callback function as an option in the DomComponent
module to transform those objects (quick example from the code).draggableComponents
option (default true
) in DomComponents. This allows movingabsolute
mode is activescript-export
property to Component (check the API Reference of the property)escapeName
option and method in SelectorManager #1703grapesjs.init({
...
selectorManager: {
escapeName: name => name.replace(' ', '___'),
},
});
props
method in Trait and Componentconfig.dragMode
- The initial configuration for the global drag modeeditor.setDragMode
- change the global drag mode of componentscomponent.setDragMode
- change the drag mode of a single componentPublished by artf over 5 years ago
component:add
also on inner added componentsmedia
option to blocks (for icons)removeType
method in DomComponents
modulefetchFile
in temporary image componentsPublished by artf over 5 years ago
script
on component removetextable
property #481 example
stopCommand
method to all commandsextend
method to the Commands modulefindType
, removeTrait
, addTrait
, updateTrait
and getTraitIndex
methods to ComponentEditor.select
methodscroll
, which allows you to scroll the canvaseditor.select(component, { scroll: true })
appendOnClick
option (default false
) to Blocks module #1951domc.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 them
components: component => `<div class="something">
${this.get('label')}
</div>`,
}
}
});
addType
in Components module. Added extendFn
and extendFnView
options.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 extend
model: {
init() {
// do something;
},
}
});
The same would be for the view by using extendFnView
undefined
value in select traitsPublished by artf over 5 years ago
preview
commandmodal:open
/modal:close
events more reliabletextnode
component and make it more compliant to other componentsDomComponents.clear
methodrun
and stop
events for CommandsonceClose
/onceOpen
methods in Modal modulestrict
option in Command module configs #1881fetchOptions
for the RemoteStorage. Closes #1885src
in the Map Component. Closes #1903extendProperties
in Sector. Closes #1913Published by artf over 5 years ago
⚠️ POSSIBLY BREAKING CHANGE
add
method, in Keymaps modulerun
/stop
can't be executed many times in the same state.editor.runCommand
willforce
:editor.runCommand('CMD', { force: 1 });
classes
as a string in Component@utils/Resizer
and update its container on text component changechange:attributes:ATTR
eventstorageManager: false
(any falsy value is ok)editor.Canvas.setZoom(VALUE_FROM_0_TO_100)
render
callback function when you create blocks (Blocks docs updated)fallback
property to Image component and its default placeholder imagescomponent:type:add
and component:type:update
events to track changes on component typesupdate
event to generally listen any change to the template (HTML/CSS)property
. Fixes #1830image-comp
, text-comp
, insert-custom
Published by artf over 5 years ago
⚠️ - POSSIBLY BREAKING CHANGE
contentTypeJson
default to true
(RemoteStorage)<a>
to default notTextable
option in the Canvas configuration. Closes #1699add
and get
methods in Selector module, now they can receive an array of selectors to add/getexternal
option. #1716justify-content
in traits style. Closes #1726load
eventautoscrollLimit
option in the Canvas modulecredentials
option in the Storage module (for the RemoteStorage) by @arthuralmeidapmodal:open
and modal:close
events in the Modal module. Closes #1717setRule
and getRule
in CssComposer moduleignoreCategories
option to the render
method in BlockManager modulecustomFetch
option in AssetManager modulescripts
. Closes #1512 by @thinkanymorePublished by artf almost 6 years ago
DomComponents.addType
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'
component:clone
event on the component which was clonedupdateAttributes
getTypes
method in DomComponents
Published by artf almost 6 years ago
Import correctly ItemView. Fixes #1672
Published by artf almost 6 years ago
component:clone
in PasteComponent to component:paste
and add component:clone
index
method to the Component APIvisible
property in Panels. Closes #1602 by @arthuralmeidapupdated
and removed
exitFullscreen
. Fixes #1667Published by artf almost 6 years ago
enableEditing
-> onActive
toRequire
option, work also with IDs of the propertytarget
option in fullscreen
command. Closes #1526 by @mcsekar12component:create
and component:mount
eventsremoveAll
method in Keymaps modulecomponent:styleUpdate
event. Fixes #1575Published by artf almost 6 years ago
valueTrue
and valueFalse
options to trait checkbox type. Closes #1424traits: [{
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',
}]
style-signature
option in ComponentsetTarget
method in StyleManagerbutton
trait typestyleManager:update:target
event to track target changes (Component or CSSRule) in Style ManagergetTrait(traitName)
method in Componentonce
, getWrapper
log
option to the main config objectavoidInlineStyle
is false #TODO issue in projectbody
selector, instead of #wrapper
, for the wrapper when requestednpm start
cross-platform. Closes #1456Published by artf about 6 years ago
auto
values. https://github.com/artf/grapesjs/pull/1415 by @nojackoremove
method in Component API[data-gjs-type=wrapper]
component:update:components
event, which allows listen to inner components changes. Closes #1409 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
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))
open-assets
command. Closes #1411Published by artf about 6 years ago