Skip to content

can we add a custom script inside vvvebjs ? after initialization ? programmatically ? #300

Answered by givanz
syedketto asked this question in Q&A
Discussion options

You must be logged in to vote

Hi

Thank you.
You want to create new components or add custom js scripts in the page after is already loaded?

You can run javascript code after the editor loads the page from here
https://github.com/givanz/VvvebJs/blob/master/editor.html#L1708

Or you can run code after the iframe is loaded with Vvveb.Builder.documentFrame.on("load", function(e) { });

To dynamically add components or sections after the editor has finished loading you can call the usual Vvveb.Components.add() https://github.com/givanz/VvvebJs/wiki/Components

Then you will need to call Vvveb.Builder.loadControlGroups() to reload the components after adding your components.
For sections and blocks you need to call Vvveb.Buil…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@syedketto
Comment options

Answer selected by syedketto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants