question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot init the editor

See original GitHub issue

Hello, im trying to use your editor in my project, that builded on Vue.js. Ive done all requested first steps, i.e: cloned repo, installed all dependencies, build with grunt. After all this steps i took the dist folder with all min. files and inserted into my project.

So now in my project i`m trying to import your scripts this way:

import * as grapesjs from '../grapesjs/grapes.min.js' but when i trying to init the editor :

    var editor = grapesjs.init({
        container : '#gjs',
        components: '<div class="txt-red">Hello world!</div>',
        style: '.txt-red{color: red}',
    });

i receive error in tht console:

ReferenceError: key is not defined
    at N.d.initUndoManager (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:530600)
    at Object.onLoad (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:468308)
    at eval (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:528954)
    at Array.forEach (native)
    at N.d.initialize (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:528932)
    at N.d.b.Model (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:32431)
    at new N.d (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:51241)
    at new b (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:535973)
    at Object.init (eval at 222 (http://localhost:3000/1.542fee55cc3d6ba6a752.hot-update.js:6:1), <anonymous>:4:538917)
    at grapeEditor (eval at 531 (http://localhost:3000/1.f63b8aaa1f38625ec4d7.hot-update.js:7:1), <anonymous>:8:79)

What i do wrong?

Thanks for help

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kkindercommented, Jun 1, 2017

Yeah, that makes sense.

It’s just that bringing it in via script tags isn’t very elegant if you’re generally using a client build system like webpack.

1reaction
artfcommented, Jun 1, 2017

@kkinder I think there is some problem with the keymaster binding. Anyway, in these days I’m switching from requirejs to webpack2 and babel so hope to see some improvements here 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio: Failed to initialize editor - java - Stack Overflow
To Solve failed to initialize editor in android studio You need to update Android Gradle Plugin. First of all Open your File ->...
Read more >
"Unable to initialize Mix Editor. Please re-open it." Error. Any ...
same here but mine says "Unable to initialize Studio. Please re-open it." and audio is always mute, without me muting it.
Read more >
Why “Can't Init Editor“ message in the web status bar at runtime.
The "Can't init edior" message means that the controls can't identify what JavaScript they need to run to initialize and thus function. Chances ......
Read more >
Cannot properly initialize the editor component in Jira Cloud ...
Hi All! Have you ever tried to connect the editor component with its components? We have the following code: import {Editor, EditorContext} ...
Read more >
How to solve the problem failed to initialize editor - YouTube
FailedToInitializeEditorHello dosto is video me hum failed to initialize editor android studio ki is problem ko 3 methods se solve karne ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found