• Resolved jimhags

    (@jimhags)


    Is there way to disable formatting so that I can put javascript for a hubspot form in the editor?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Lap

    (@lapzor)

    When editing a box there should be a choice in the right top corner of the editor for “visual” or “text”. If you click on “text” you can add HTML and JavaScript code.

    Thread Starter jimhags

    (@jimhags)

    I thought the problem was the JavaScript, but it is actually that the hubspot form script is firing when the page loads, embedding the form at the bottom of the site, and not inside the box (which is fired at 65% scroll). Is there a way to keep the script from loading until the box loads?

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Jim,

    We’ve just added this short article on Boxzilla’s JavaScript events to our knowledge base.

    Basically what you want to do is use the Boxzilla.on(event, callback) function to delay your function execution until a certain event fires.

    
    <script>
    Boxzilla.on('box.show', function(box) {
       // your hubspot code goes here
    });
    </script>
    

    Hope that helps!

    Thread Starter jimhags

    (@jimhags)

    I couldn’t get it to inject the hubspot code into a div in the box. I think if the editor had a raw html mode it may work. I ended up putting in a custom form and doing an API call to Hubspot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Javascript into editor’ is closed to new replies.