Issue #345Opened September 28, 2017by bungambohlah0 reactions

[QUESTION] How to open Materialize modal from my custom command src/commands/index.js ?

Question

Hello @artf , nice to see you again, i have a question, how to initialize materializecss modal from source code commands grapesjs? , let's see the code.

initialize modal :

$("#modal1").modal("open");

then in the src/commands/index.js :

defaultCommands['tlb-show-modal'] = {
    run(ed) {
        var sel = ed.getSelected();

        ed.select(null);
        console.log(this);
        $("#modal1").modal("open");
    },
};

Then after run the command, it's not work modal is not a function, can i customize DOM element from your source? or is there any other way? thank you and have a nice day

Answers (0)

No answers yet.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.