Git Product home page Git Product logo

Comments (6)

Ju99ernaut avatar Ju99ernaut commented on May 30, 2024

Remove grapesjs-indexeddb plugin.

from grapesjs-template-manager.

serfermorhc avatar serfermorhc commented on May 30, 2024

If i do that i get this other error;

Uncaught TypeError: crypto.randomUUID is not a function
at Z.r.run (commands.js:63:12)
at Z.r.callRun (grapesjs:2:353065)
at Object.runCommand (grapesjs:2:350160)
at Object.run (grapesjs:2:349664)
at Object.runCommand (grapesjs:2:883147)
at index.js:114:17
at IDBRequest.r.onsuccess (indexeddb.js:45:25)

The line on commands.js;

cm.add('get-uuidv4', () => crypto.randomUUID() || uuidv4());

cm.add('take-screenshot', (editor, s, options = { clb(d) { return d } }) => {
    const el = editor.getWrapper().getEl();
    getJpeg(el, {
        quality: opts.quality,
        height: 1000,
        'cacheBust': true,
        style: {
            'background-color': 'white',
            ...editor.getWrapper().getStyle()
        },
    }, options.clb, opts.onScreenshotError);
});

Thank you for your help!

from grapesjs-template-manager.

Ju99ernaut avatar Ju99ernaut commented on May 30, 2024

Looks like your browser doesn't support the crypto.randomUUID function, there's a fallback but it doesn't seem to be handled properly so I'll look into fixing that. Which browser are you using?

from grapesjs-template-manager.

serfermorhc avatar serfermorhc commented on May 30, 2024

Same error on Chrome and Firefox

Firefox;
image

Chrome;
image

from grapesjs-template-manager.

serfermorhc avatar serfermorhc commented on May 30, 2024

Okay, i think i found my mistake, it was with the import of grapesjs file.

Now i have another error, when i import your plugin on top of HTML file, it loads and i get this error;

image

I think its because editor its not created yet, but if i load your plugin on the bottom of html, grapesjs gives the error of plugin not found, because your plugin its not loaded yet.

Am i doing something wrong? Thank you.

from grapesjs-template-manager.

Ju99ernaut avatar Ju99ernaut commented on May 30, 2024

You'll need to load the editor and all plugins before initialization. One way of doing this is loading them in the head of your document.

from grapesjs-template-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.