GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
636 stars 227 forks source link

Backbone.undoManager is not constructor #11

Closed ghost closed 7 years ago

ghost commented 7 years ago

TypeError: Backbone.UndoManager is not a constructor at N.d.initUndoManager (grapes.min.js:17) at Object.onLoad (grapes.min.js:15) at grapes.min.js:17 at Array.forEach (<anonymous>) at N.d.initialize (grapes.min.js:17) at N.d.b.Model (grapes.min.js:2) at new N.d (grapes.min.js:3) at new b (grapes.min.js:17) at Object.init (grapes.min.js:17) at VueComponent.mounted (234:8)

when i disable undoManager still it gives same error.

artf commented 7 years ago

Sorry but can't reproduce it, are you using the last version of grapesjs?

ghost commented 7 years ago

Yes, I'm using the latest version of GrapesJs(The MJML repo: https://github.com/artf/grapesjs-mjml)

artf commented 7 years ago

Can you post here your code please?

ghost commented 7 years ago

Here is my code:

editor = grapesjs.init({
      height: '100%',
      noticeOnUnload: 0,
      storageManager:{autoload: 0},
      container : '#gjs',
      fromElement: true,
      config: {
         undoManager: false
      },
      plugins: ['gjs-mjml'],
      pluginsOpts: {
        'gjs-mjml': {}
      }
    });
    window.editor = editor;
artf commented 7 years ago

there is no 'config' key

editor = grapesjs.init({
      height: '100%',
      noticeOnUnload: 0,
      storageManager:{autoload: 0},
      container : '#gjs',
      fromElement: true,
      undoManager: false,
      plugins: ['gjs-mjml'],
      pluginsOpts: {
        'gjs-mjml': {}
      }
    });
    window.editor = editor;
ghost commented 7 years ago

i tried as you wrote in last reply . but it gave same error. So i tried 'config' key.