HTML (in rich text)
Drop a snippet of custom HTML inline within a block of formatted text.
The HTML option lets you paste raw HTML directly into a block of formatted text: a third-party embed, a partner widget, or markup a developer handed you. It appears at your cursor without breaking the paragraph. Use it when the regular editor cannot produce what you need.
Insert it from the editor's insert menu, under the Basic group. It is one of three things you can place inside a block of formatted text: an inline button, a piece of media, or this HTML snippet.
The field
HTML: a code box where you paste or edit your markup. There are no other settings.
What renders, and what gets removed
Basker cleans your HTML before showing the page to visitors. What you paste is not always what appears. Most everyday embed markup survives:
- Standard content tags: headings, paragraphs, lists, links, tables, and figures.
- Media tags:
img,picture,audio, andvideo. - Embeds that use an
iframe: most maps, video players, and many widgets, sinceiframeis allowed. - Inline styling: a
styleattribute, aclass, anddata-*attributes.
Links are limited to standard web, email, and phone addresses (http, https, mailto, tel). Basker strips tags and attributes outside the permitted set. It always removes inline event handlers such as onclick.
Scripts will not run from this block
Basker removes any <script> you paste here before the page renders, so tracking pixels, analytics, and script-based embeds will not work from an HTML snippet. Put marketing and analytics code in your theme's Custom Code settings, or load it through your tag manager. If an administrator adds a script's source domain to your site's trusted-embed list, that external script can run. No domains are trusted by default. Approved third-party embeds may include their own custom widget elements, which Basker allows alongside the trusted script.
The cleanup happens at render time. The safest way to confirm a snippet works is to preview the page and check the result, instead of trusting the editor view.
Shared controls
The HTML snippet has no layout, background, or spacing controls of its own. It sits inline wherever you place it, and follows the formatting of the surrounding text. For everything else the surrounding block offers, see The rich text editor.
Worked example
To embed a map from a service that provides iframe code:
Copy the embed code
From the map provider, copy the embed snippet. Confirm it is an <iframe> embed, not a script-based one. Script embeds will not run here.
Insert the HTML option
Place your cursor where the map should appear in the text. Open the editor's insert menu. Choose the Basic group. Select HTML.
Paste and preview
Paste the snippet into the HTML box. Preview the page to confirm the map renders as expected before publishing.
Where to go next
The rich text editor
The formatted-text field this snippet lives inside, and the inline button and media options alongside it.
Button (in rich text)
Drop a call-to-action button inline at your cursor.
Media (in rich text)
Place an image or video inline within the text.
Drafts and preview
Check how a snippet actually renders before it goes live.
Theme settings
Where Custom Code and other site-wide settings live, for tracking and analytics code.