-
-
Notifications
You must be signed in to change notification settings - Fork 28
Block types
The Kirby Editor comes with a set of default block types to create rich content.
A code block can be used to add code examples to your document, which will be rendered in a HTML code block:
<pre><code>Your code</code></pre>
The selected code language. This will automatically be added as CSS class to the code element and can be used for syntax highlighting for example.
<pre><code class="language-php">Your code</code></pre>
<h1 id="your-headline">Your headline</h1>
<h2>Your headline</h2>
<h3>Your headline</h3>
<figure>
<img src="https://example.com/image.jpg" alt="Alt text">
<figcaption>
This is a nice image
<figcaption>
</figure>
The entered alternative text, if available
The entered caption text, if available
CSS class name, which can be used to add a custom selector to the wrapping figure element (i.e. for special layout)
A global unique ID for the image, which is used to find the matching File object in Kirby.
The ratio of the image is used in the editor to create a wrapping placeholder container. The same can be done in the snippet to build more robust responsive images.
The absolute URL of the image
The KirbyText block can be used to enter Markdown, KirbyText and/or HTML for more flexibility, when the other block types are not enough. The result will be rendered with the KirbyText parser.
<!-- Your custom markdown -->
<hr>
<ol>
<li>List item A</li>
<li>List item B</li>
<li>List item C</li>
</ol>
<ul>
<li>List item A</li>
<li>List item B</li>
<li>List item C</li>
</ul>
<blockquote>
Inspiring quote
</blockquote>
<p>Your text</p>
<figure>
<iframe src="https://youtube.com/embed/1234"></iframe>
</figure>
The Video URL. This can be used in Kirby's video()
helper to create the embedding iframe.