Skip to content

Releases: GrapesJS/grapesjs

v0.16.12

23 Apr 01:40
Compare
Choose a tag to compare

Added

  • Added Brazilian Portuguese language #2653
  • Added closestType and empty methods to Component API
  • Added disable property to the Block
  • Added module aliases to the Editor object
    DomComponents -> Components
    LayerManager -> Layers
    CssComposer -> Css
    StorageManager -> Storage
    AssetManager -> Assets
    BlockManager -> Blocks
    TraitManager -> Traits
    SelectorManager -> Selectors
    StyleManager -> Styles
    DeviceManager -> Devices

Changed

  • Customize Sorter placeholder color via CSS #2662
  • Add a default limit (500) of maximum steps in UndoManager
    Can be changed by config.undoManager.maximumStackLength option on init

Fixed

  • Update canvas tools on input event trigger in components
  • Fix borders not always toggling back when exiting preview #2689
  • Close the color picker if click event happens on canvas #2695
  • Avoid canvas errors by ensuring the view on the element render
  • Fixed wrong toolbar position #2656
  • Fixed major memory leaks in components
  • Fixed TableRow model component #2697
  • Fixes on color picker #2694

v0.16.3

21 Mar 01:21
Compare
Choose a tag to compare

Added

  • Avoid rendering of private CSS properties (identified by __ prefix)
  • Added Dutch language by @jorisros #2643
  • Added Persian language by @majidh1 #2649
  • Added prepend option to the stack style manager type

Fixed

  • Escape selectors in CSS code #2624
  • Fix custom panels not hidden in preview mode #2636
  • Avoid multiple change events on style property change

v0.16.2

09 Mar 21:47
Compare
Choose a tag to compare

Added

  • Added style:update and style:update:{property} events for StyleManager
  • Added new component:drag events #2500
  • Added a new svg-in component to handle better inner SVG elements
  • Trigger component:drag events in Layers #2528
  • Added German translation by @chickahoona #2578
  • Added new config.assetManager.showUrlInput option. by @jcamejo #2602

Changed

  • Refactored the canvas #2524
  • Improved how the style property is taken in stack properties

Fixed

  • Check property visibility on render #2497
  • Fix Selector Manager styles for Firefox/IE/Edge #2490
  • Update video attributes on render #2501
  • Avoid useless attributes on nodes inside text components #2508
  • Avoid 404 requests on background property change #2538
  • Update style on block drop in absolute mode
  • Check visibility borders on preview stop #2589
  • Preserve the display value on layer hide #2571
  • Check for the href value in appendStyles to avoid 404 errors #2605
  • Fix ComponentImage's default src not being base64 encoded #2619

v0.15.10

05 Jan 14:56
Compare
Choose a tag to compare

Added

  • Added new options for customization to config.selectorManager and the component-first selection via config.selectorManager.componentFirst option #2474
  • Added state option in RTE actions to enable custom checks for enabling/disabling action buttons. Thanks @adriangroch #2429
  • Added Spanish language. Thanks to @josfh2005 #2443
  • Added French language. Thanks to @jmalapeer #2449

Changed

  • Escape HTML characters when converting text node to HTML. Thanks @mcammisa #2446
  • Use custom-name property on layer name edit
  • Update layers view when component prop layerable changes #2433

Fixed

  • Export correctly <body> when config.exportWrapper option is used #2096
  • Fixed empty text after a drag of a component in editing mode #2452
  • Destroy RTE module when editor.destroy is called #2469
  • Calibrate the coordinates on toolbar click #2375
  • Avoid dragging methods when no target is found #2478

v0.15.9

30 Nov 00:16
Compare
Choose a tag to compare

Docs

Changed

  • Sync text component content with custom RTE #2292
  • Removed FontAwesome from dependencies to load it asynchronously by the new cssIcons option #644

Added

  • I18n module

Fixed

  • Fixed text component issue on toolbar commands execution #2294
  • Fixed Firefox bug with label editing #2332
  • Fixed issues in absolute mode and components with scripts #2359
  • Fixed body counter in Layers #2413
  • Make integer property extendable #2360
  • Fixed issue on component drag in absolute mode #2371
  • Preserve selection after canvas:drop #2396
  • Remove empty value from target trait #2411

v0.15.8

17 Sep 06:35
Compare
Choose a tag to compare

Changed

  • Make config.avoidInlineStyle true by default
    We actually gonna stop to support the old inline-style method so this option will be removed soon
  • Guarantee the uniqueness of components id
    Now if you update the component with the id attribute that already exists, it will rollback to the previous one

Added

  • Added config.styleManager.textLayer option #2246

Fixed

  • Remove undefined titles in StyleManager #2248
  • Fix errors in IE11 #2247
  • Update component CSS rule selectors on id change #2249

v0.15.5

08 Sep 09:47
Compare
Choose a tag to compare

⚠️ POSSIBLY BREAKING CHANGE

Docs

  • Update docs for richTextEditor config #2241

Changed

  • ⚠️ Typo fix config.wrappesIsBody -> config.wrapperIsBody @jcamejo #2222
  • Set avoidDefaults true by default
  • Support objects/arrays in script interpolations #2239

Added

  • Added at option to addProperty method in StyleManager #2213
  • Added config.assetManager.beforeUpload callback option (thanks to @tliscomb) #2227

Fixed

  • Fix image resize issue #2002
  • Fix text component issues in Safari/Firefox #2210
  • Fix style properties with undefined #2206
  • Fix drag issue with text components

v0.15.3

13 Aug 17:05
Compare
Choose a tag to compare

⚠️ POSSIBLY BREAKING CHANGE

Docs

Changed

  • ⚠️ 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];
  • ⚠️ Updated traits layout. If you've ever customized the CSS of your traits you might see something broken
  • Upgrade to Babel 7
  • Recreate view element on script prop update
  • Log a warning in case no sector, in StyleManager, is found #2068

Added

  • Added support for components generated from JSX (React preset).
    In this way, you can use editor.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.
    If you work in a different framework environment with JSX support (eg. writing JSX in Vue SFC generates another kind of objects) you can use a custom processor callback function as an option in the DomComponent module to transform those objects (quick example from the code).
  • Added the possibility to specify the position on sector add via API #2094
  • Added draggableComponents option (default true) in DomComponents. This allows moving
    components by dragging the component itself (not only by the move icon in the toolbar)
  • Allow dropping blocks absolutely when the absolute mode is active
  • Added script-export property to Component (check the API Reference of the property)
  • Added escapeName option and method in SelectorManager #1703
    With this option you can now set a custom name escape strategy on selectors (eg. classes)
    grapesjs.init({
        ...
        selectorManager: {
          escapeName: name => name.replace(' ', '___'),
        },
    });
  • Added props method in Trait and Component
  • Added new [API for extending Traits] (https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type)
  • Added new Drag Mode API for changing drag modes of components in canvas
    • config.dragMode - The initial configuration for the global drag mode
    • editor.setDragMode - change the global drag mode of components
    • component.setDragMode - change the drag mode of a single component

Fixed

  • Update defaults on top/right/bottom/left properties #2091
  • Fix autoscroll on dragging components in absolute mode
  • Update border-radius ordering in Style Manager #2105
  • Use stopCommand in Preview command #2174
  • Canvas Touch Support iOS #2175
  • Fixed issues around Drag Mode API

v0.14.62

03 Jun 00:44
Compare
Choose a tag to compare

Changed

  • Avoid the default form behavior on submit
  • Prefer target value first in Select trait
  • Remove traits information from component JSON
  • Update icon styles in layers and component name editing
  • Trigger component:add also on inner added components

Added

  • Added media option to blocks (for icons)
  • Added removeType method in DomComponents module

Fixed

  • Update sortMediaObject to sort CSS correctly also in the mobile first approach #1996
  • Fix regression with textable components
  • Render attributes for temporary components. Fixes #2010
  • Fix drag and drop from outside of the canvas
  • Avoid fetchFile in temporary image components
  • Fix unit change in Style manager #2028
  • Avoid errors on class status toggle. Closes #2035
  • Fix position of the toolbar when is outside of the canvas
  • Propagate the extension of new commands to old. #2054

v0.14.61

01 May 23:38
Compare
Choose a tag to compare

Docs

Changed

  • Avoid scrollIntoView if the element isn't found
  • Clean JS from script on component remove
  • Print a warning when trying to use not existing component type

Added

  • Added Comment component
  • Added textable property #481 example
  • Added stopCommand method to all commands
  • Added extend method to the Commands module
  • 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 them
      	components: 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 extend
      model: {
        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
  • Skip rendering for temporary components #1941
  • Avoid undefined value in select traits
  • Avoid the default link behavior in the canvas
  • Avoid showing in layers not layerable components

Removed

  • Removed old deprecated commands: CreateComponent, DeleteComponent, SelectParent