search

Typemill Plugins

HTML - Use Tags with Shortcodes

With this plugin, you can seamlessly integrate HTML tags into your Markdown content using simple shortcodes. The plugin supports various HTML tags, including div, span, address, mark, sub, sup, and kbd. Additionally, you have the flexibility to add classes and IDs to each tag. To utilize this plugin, ensure you have a MAKER-license.

Traditionally, HTML tags are permitted in Markdown per its specification. However, for security reasons, they are disabled in Typemill. Responding to user feedback, this plugin offers a secure way to incorporate HTML tags into Typemill without relying on complex libraries for HTML sanitization.

General Usage

HTML tags can be used both in the raw Markdown editor and the visual editor. When using the visual editor, HTML tags will appear in a paragraph element, enabling you to write HTML as you would write standard text.

An animated gif demonstrates the html-plugin

In the visual editor, HTML tags are displayed in light gray, allowing you to distinguish your HTML code easily. You can even reposition HTML elements using drag-and-drop.

Working with IDs and Classes

All HTML tags accept the attributes id and class. You have two options to style your elements with classes:

Accordion Demo

The HTML plugin adds custom CSS and JavaScript to the frontend, enabling you to create an accordion-style interface like the following:

How To Use

You can use the HTML plugin to create elements like accordions, tabs, and slideshows with pure markdown and a little bit of HTML.

Code Examples

Scroll down to the bottom of the page to see example code. The example code is made with a tab element.

Use Templates

If you do not want to copy and paste the example code for elements like tabs, slideshows, and accordions, you can also use the template plugin to load these elements as templates.

Slideshow Demo

You can use it to create a slideshow element. Slideshows can contain images or any other content elements.

Screenshot
Photo by Jongsun Lee Unsplash
Photo by Mathew Schwartz on Unsplash
Photo by Hendrik Kuterman on Unsplash

Code Examples (Tab Element)

You can use it to create a tab element. Tabs are useful for various types of content. In documentation, they are often used to switch between coding examples for different languages.

Div and Span

The div and span elements are probably the most useful tags. It's recommended to use div tags as block elements on separate lines.

[:div class="myclass test" id="myid":]

This is text inside the div with an [:span class="myclass":]inline span element[:/span:] inside the div.

[:/div:]

You can also nest div and span tags within the same line:

[:div class="myclass":][:span:]This is a span nested in a div in one line.[:/span:][:/div:]

It is also possible to use inline span-elements at the beginning and at the end of a line. In this case they will be treated as block-elements.

[:span class="myclass":]one line starting and ending with a span element.[:/span:]

Address

The address tag should be used as block element.

[:address:]

Typemill Inc.  
Millerstreet 12
11223 Bread-City

[:/address:]

Mark, kbd, sub, sup

Inline usage is suitable for mark, kbd, sub, and sup tags:

A [:mark:]mark-tag[:/mark:] for marks, and the [:kbd:]kbd[:/kbd:] tag for keyboard buttons. The tag [:sup:]sup[:/sup:] and [:sub:]sub[:/sub:] are very useful either!
[:div id="accordion" :]

### Accordion

[:div class="accontent" :]

You can use the html-plugin to create accordion elements with pure markdown and a little bit of html. 

[:/div:]

### Tabs

[:div class="accontent" :]

In the next release we will also add an easy solution to create simple tab-elements.  

[:/div:]

### Slideshows

[:div class="accontent" :]

It is also planned to create simple slideshows for images. Be aware that all these elements work with html-tags, so we do not provide an easy interface for users without basic html-knowledge.  

[:/div:]

[:/div:]
[:div id="slideshow":]

[:div class="slide active":]

![Screenshot](media/live/jongsun-lee-l84ef9qrgt0-unsplash2.jpg){.center loading="lazy" width="820" height="547"}
*Photo by [Jongsun Lee](https://unsplash.com/@sarahleejs) Unsplash     *

[:/div:]

[:div class="slide":]

![](media/live/mathew-schwartz-jwj1kiux42c-unsplash.jpg){.center loading="lazy" width="821" height="547"}
*Photo by [Mathew Schwartz](https://unsplash.com/@cadop) on Unsplash*

[:/div:]

[:div class="slide":]

![](media/live/hendrik-kuterman-ryxuv6g5asa-unsplash.jpg){.center loading="lazy" width="821" height="547"}
*Photo by [Hendrik Kuterman](https://unsplash.com/@hendrik_martin) on Unsplash*

[:/div:]

[:div class="slide-nav":]

* [‹ previous](#prev-slide)  
* [next ›](#next-slide)

[:/div:]

[:/div:]
[:div id="tabs":]

* [Tab 1](#tab1)  
* [Tab 2](#tab2)  
* [Tab 3](#tab3)  

[:div id="tab1" class="tab-content":]

You can only use one tab element per page. Adding multiple tab elements may cause them to malfunction. 

[:/div:]

[:div id="tab2" class="tab-content":]

If you want to customize the tab styles, use the custom CSS field in the theme settings.  

[:/div:]

[:div id="tab3" class="tab-content":]

If you are using the Ebook plugin, keep in mind that tabs and other interactive elements do not work in formats like PDF or ePub.  

[:/div:]