Skip to content
  • v0.17.3
  • e914a3f
  • Compare
    Choose a tag to compare
    Search for a tag
  • v0.17.3
  • e914a3f
  • Compare
    Choose a tag to compare
    Search for a tag

@artf artf released this Apr 22, 2021

⚠️ POSSIBLY BREAKING CHANGE

Added

  • ⚠️ New Pages API for handling multi-pages in GrapesJS Check PR - Demo
  • Adds a title attribute to layers panel elements #3360
  • Added Swedish translation #3384

Changed

  • Update _gjs_canvas.scss, allow vars to override and fix missing use of $canvasTop #3391
Assets 2

@artf artf released this Mar 22, 2021

Changed

  • Expose the view for block category models #3293

Fixed

  • Improve Layer name editing #3319
  • Fix string symbols #3325
Assets 2

@artf artf released this Mar 4, 2021

Added

  • Expose CodeMirror in CodeMirrorEditor.js #3286

Changed

  • Resize components properly with percentages #3186

Fixed

  • Fix clone #3291
  • Avoid rendering blocks twice #3283 #3284
  • Fix for old Components with JS containing comments #3300

Removed

  • Remove useless code from Block #3274
Assets 2
Mar 4, 2021

@artf artf released this Feb 19, 2021

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
Assets 2

@artf artf released this Jan 6, 2021

Docs

  • Updated Components & JS guide with the new approach for the creation of Components with JS (the old one still works).
    The biggest advantage over the previous one is how the final code is created. With the old one, you could have the whole script content duplicated as many times as components of the same type (new script content will be output only once per type). The new approach avoids also issues with different JS minifiers (due to string templates).

Added

  • Added script-props property to Component. Read the new Components & JS
  • Wherever you add/remove/update a component you can now pass noCount option to avoid triggering the count of changes (eg. for skipping the Storage)
editor.addComponents('<div>New components</div>', { noCount: true });
// or
component.append('<div>New components</div>', { noCount: true });
  • Added move() method to the Component

Changed

  • Start using grapesjs-cli for the dev server and the build
  • In UndoManager, start using noUndo option instead of avoidStore for skipping the trigger
  • Rerender Component toolbar when necessary
  • Keep track of selected components when turning on/off the preview

Fixed

  • Avoid useless change counter updates #3189
  • Properly hide all toolbars when a Component is removed #3175
  • Pass properly the options when removing components and rules #3176
  • Adjust editor listeners in PropertyView #3197
  • Avoid twice the storage of src in Image components #3201
  • Hide properly the toolbar on the preview on #3209
Assets 2

@artf artf released this Dec 6, 2020

Added

  • Added Catalan language #3105
  • Allow to pass el prop to Buttons from Panels module
  • New getRules(selector) method added in CssComposer module
  • Added and improved destroy method in all modules, in order to fix general memory leaks
  • Added limitlessMax and limitlessMin props to InputNumber in order to allow showing calculated values from components #3147
  • Added keydown event to handle up and down arrows in InputNumber #3158
  • Added contains method to Component
  • Started Symbol implementation (for now, only private APIs)

Changed

  • Codemirror version upgrade #3106
  • Improve number trait #3132
  • Replaced node-sass with dart-sass #3148
  • Apply avoidDefaults option also to Selectors in toJSON method

Fixed

  • Clone properly the component with its related styles #3093
  • Fix unbind of keymaps #2758
  • Fix RTE update in text components #3069
  • Fix update of properties on setTarget in StyleManager #3081
  • Fix hover state in Layers #3065
  • Prevent frame scroll on the first component drag #3134
  • Parse single textnode as component #3034
  • Prevent losing component id on undo/redo
Assets 2

@artf artf released this Oct 24, 2020

Added

  • Expose PropertyFactory in StyleManager
  • Added tools option to editor.refresh()
  • Handle multiple selection in Layers
  • Trigger change:style and change:style:PROPERTY event on selected componets during style update via Style Manager
  • Added attributes option to the Modal.open() method #2592
    editor.Modal.open({ title: 'T', content: 'C', attributes: { class: 'custom-cls' } })
  • Added parse:html and parse:css events for catching parsers results
  • Added Polish language #3087

Changed

  • Allow removing parent component from children #2940
  • Fixed German translations #3024

Fixed

  • Fixed for in loop in commands #3006
  • Check only the component style for the target update #2657
  • Avoid dragging in canvas non-draggable components #3014
  • Destroy correctly the LayerManager #3005
  • Prevent update trigger from TraitNumberView
  • Fixed default value get in TraitNumberView
  • Fixed non integer steps for slider property #3029
  • Don't use display: block on visible sectors and properites in StyleManager #3067
  • Rollback to the strikeThrough RTE command #3047
  • Avoid style remove on blur from the text component #3069
  • Fixed setTarget method in StyleManager #3081
Assets 2

@artf artf released this Sep 2, 2020

Added

  • Expose options parameter to setStyle & setComponents #2872
  • Added Korean language #2983
  • New API for custom properties in Style Manager (similar to Traits)

Changed

  • Made Helvetica sans-serif by default #2881
  • Replace obsolete tag <strike> by <s> in RTE #2886
  • Avoid adding, to components, empty parsed HTML strings
  • Added options as a second argument of component.addAttributes method

Fixed

  • Output properly boolean attributes from HTML string import (eg. required, disabled) #2844
  • Update component tools box once image finished to load #2871
  • Fixed retrieval of layers' visibility #2863
  • Ensure resizer on the correct component #2876
  • Disable component drag on preview #2904
  • Render correctly the textnode component #2882
  • Add list prop to video component (youtube related) #2887
  • Ensure selected value in select Trait type #2896
  • Fully clear hover state on mouseleave #2907
  • Avoid infinite recursion in Firefox on component drag #2911
  • Fixed editor.load bug with undo manager #2921
  • Make textnodes correctly removable #2918
  • Prevent error on editor.destroy() with selection #2953
  • Update Style Manager on Layer visibility change #2938
  • Prevent errors on body hover #2974
  • Added listenToEl option in order to refresh the editor on scrollable elements #2722
  • Put quotes around URLs in CSS property like background-image #2975
  • Fixed retrieval of text component content with custom RTE #2977
  • Fixed issues with the stack property in StyleManager
Assets 2
Jun 19, 2020