ComboStrap UI - Native HTML Inline Icon

1 - About

This is just an informative article on how to embed an SVG icon with the HTML tag of dokuwiki.

For security reason, this is not recommended in a public website where users you can edit the page because the HTML tag allows it.

If you want to add an icon, see the icon component.

2 - Steps

2.1 - Prerequisites

The htmlok configuration should be on.

2.2 - Get an icon

2.3 - Get the Inline SVG for HTML

  • Copy the Inline SVG for HTML
<svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="currentColor" d="M3,1C1.89,1 1,1.89 1,3V14C1,15.11 1.89,16 3,16C4.33,16 7,16 7,16C7,16 7,18.67 7,20C7,21.11 7.89,22 9,22H20C21.11,22 22,21.11 22,20V9C22,7.89 21.11,7 20,7C18.67,7 16,7 16,7C16,7 16,4.33 16,3C16,1.89 15.11,1 14,1H3M3,3H14C14,4.33 14,7 14,7H9C7.89,7 7,7.89 7,9V14C7,14 4.33,14 3,14V3M9,9H14V14H9V9M16,9C16,9 18.67,9 20,9V20H9C9,18.67 9,16 9,16H14C15.11,16 16,15.11 16,14V9Z" />
</svg>

2.4 - Embedded the SVG into the HTML tag

  • Put it between two HTML tag
<html>
<svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="currentColor" d="M3,1C1.89,1 1,1.89 1,3V14C1,15.11 1.89,16 3,16C4.33,16 7,16 7,16C7,16 7,18.67 7,20C7,21.11 7.89,22 9,22H20C21.11,22 22,21.11 22,20V9C22,7.89 21.11,7 20,7C18.67,7 16,7 16,7C16,7 16,4.33 16,3C16,1.89 15.11,1 14,1H3M3,3H14C14,4.33 14,7 14,7H9C7.89,7 7,7.89 7,9V14C7,14 4.33,14 3,14V3M9,9H14V14H9V9M16,9C16,9 18.67,9 20,9V20H9C9,18.67 9,16 9,16H14C15.11,16 16,15.11 16,14V9Z" />
</svg>
<html>
  • Result: