Basker Docs

Custom HTML

Add your own HTML as a section of the page, with optional scripts from trusted providers.

The Custom HTML block adds a section of the page from HTML that you paste in. Examples are a partner widget, a donation form, or markup from a developer. Use it when no other block can produce what you need.

To place a small snippet between paragraphs of text, use the HTML option in the rich text editor instead.

HTML

  • HTML: a code box where you paste or edit your markup.
  • Allow Embedded Scripts: lets a third-party embed load its script. Off by default. See Scripts.

You can type these tokens into the markup. The live page replaces them:

  • {{organization}}: your site's name.
  • {{year}}: the current year.

What renders, and what gets removed

Basker cleans your HTML before it shows the page to visitors. Standard content tags stay: headings, paragraphs, lists, links, tables, and images. audio, video, and iframe embeds also stay. Basker always removes inline event handlers such as onclick. It also removes tags and attributes outside the permitted set. Links can only use http, https, mailto, and tel addresses.

Scripts

With Allow Embedded Scripts off, Basker removes every <script> from the markup.

With it on, a script runs only when both of these are true:

  • It loads from a separate file, with a src address. Basker always removes scripts written directly in the markup.
  • Its address is on a domain that an administrator has added to your site's trusted embed domains, with scripts allowed. See Trusted embed domains.

Basker removes every other script. By default, no domains are trusted. Until an administrator adds the provider's domain, the toggle has no effect.

Tracking code belongs elsewhere

Put analytics and tracking code in your theme's Custom Code settings or your tag manager, not in this block. See Google Analytics.

Shared controls

On the Layout tab, Width offers Full Width, Page, Narrow, Reading, or Custom. Custom shows a slider from 200 to 2000 px, with a default of 1200 px. The default width is Page.

Example

To add a donation widget from a provider:

Trust the provider's domain

Ask an administrator to add the provider's domain to your trusted embed domains, with scripts allowed.

Add the block

Add a Custom HTML block where the widget should appear. Paste the provider's embed code into HTML.

Allow the script

Turn on Allow Embedded Scripts.

Preview the page

Preview the page to confirm that the widget loads before you publish.

Where to go next

On this page