[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.
Issue #399
[Question] Can i push toolbar in current modal and current modal child?
Hello again @artf , i confuse about push toolbar in the element with specific class (ex: modal-trigger) the element code is : and in the /s...
Issue #363
[QUESTION] How to get child object ?
Hi @artf i want to ask about get some child from current model, let's say in that source code, can i get child object like get parent objec...
Issue #665
Custom component and save
Sorry, me again ! I'm trying to save my template with my new component "img-link" : But when I save my template using the gjs-get-inlined-h...
Issue #1804
Applying two different traits on same html tag but applies only one
Hello @artf , If we need to initialize two traits on same HTML tag then it's possible or not? Actually i define two different traits on sam...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.