Support » Plugin: Gutenberg » What Gutenberg Block should be used for JavaScript snippets?

  • Resolved Haeussi

    (@haeussi)



    What Gutenberg Block should be used to insert JavaScript snippets to WordPress pages?

    For example HubSpot JavaScript snippet to add a form to a contact page.

    <script charset=”utf-8″ type=”text/javascript” src=”//js.hsforms.net/forms/shell.js”></script>
    <script><br />
    hbspt.forms.create({<br />
    portalId: “4812005”,<br />
    formId: “101e0e44-bf8c-41c0-abfa-7f1c087df36f”<br />
    });<br />
    </script>

    Thank you for your assistance!

Viewing 1 replies (of 1 total)
  • Moderator Marius L. J.

    (@clorith)

    Hi,

    The Custom HTML block is probably your best bet, keeping in mind that you will need appropriate access on a site for it no to be stripped away (administrator access is needed to post unfiltered HTML like JavaScript).

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.