Skip to content

Kirby 5.0.4

markdown

A plaintext HTML/markdown/kirbytext block. This is perfect to combine WYSIWYG content with custom HTML, Kirbytext or Markdown.

Preview

Default files

Snippet

By default, Kirby uses the following snippet to render the markdown block:

<?php /** @var \Kirby\Cms\Block $block */ ?>
<?= $block->text()->kt();

To overwrite this default snippet, place your custom file in /site/snippets/blocks/markdown.php.

Blueprint

By default, Kirby uses the following blueprint for the markdown block:

name: field.blocks.markdown.name
icon: markdown
preview: markdown
wysiwyg: true
fields:
  text:
    label: field.blocks.markdown.label
    placeholder: field.blocks.markdown.placeholder
    type: textarea
    buttons: false
    font: monospace

To overwrite this default blueprint, place your custom file in /site/blueprints/blocks/markdown.yml.

Vue component

kirby/src/components/Forms/Blocks/Types/Markdown.vue