---
url: 'https://metadrop.net/en/articles/ckeditor5-markdown-explicit-markdown-to-html-conversion-for-drupal-editors'
title: 'CKEditor5 Markdown: explicit Markdown-to-HTML conversion for Drupal editors'
author: 'Jorge Tutor'
date: '2026-06-10T10:03:07+00:00'
updated: '2026-07-09T13:22:19+00:00'
type: article
summary: 'CKEditor5 Markdown is a new Drupal contrib module that adds CKEditor5 toolbar plugin into the toolbar for converting Markdown to HTML on demand.'
tags:
  - 'Drupal Planet'
  - Drupal
  - CKEditor
  - Markdown
image: 'https://metadrop.net/sites/default/files/styles/full/public/2026-06/ckeditor5-markdown-paste.png.webp?itok=dFcBNcbz'
files:
  - 'https://metadrop.net/sites/default/files/2026-07/2026-drupal-module-ckeditor5-markdown.pdf'
published: true
og:
  determiner: Automatic
  site_name: Metadrop
  'image:url': 'https://metadrop.net/sites/default/files/styles/full/public/2026-06/ckeditor5-markdown-paste.png.webp?itok=dFcBNcbz'
  'image:type': image/png
  'image:width': '865'
  'image:height': '733'
  'image:alt': 'CKEditor5 Markdown: explicit Markdown-to-HTML conversion for Drupal editors'
  street_address: 'Calle Manuel Luna, 12, 3 Dcha'
  locality: Madrid
  region: Madrid
  postal_code: '28020'
  country_name: España
  email: hola@metadrop.net
  phone_number: '910053180'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': Article
      '@id': 'https://metadrop.net/en/articles/ckeditor5-markdown-explicit-markdown-to-html-conversion-for-drupal-editors#article'
      name: 'CKEditor5 Markdown: explicit Markdown-to-HTML conversion for Drupal editors'
      headline: 'CKEditor5 Markdown: explicit Markdown-to-HTML conversion for Drupal editors'
      description: 'CKEditor5 Markdown is a new Drupal contrib module that adds CKEditor5 toolbar plugin into the toolbar for converting Markdown to HTML on demand.'
      about:
        - Drupal
        - CKEditor
        - Markdown
      image:
        '@type': ImageObject
        url: 'https://metadrop.net/sites/default/files/styles/full/public/2026-06/ckeditor5-markdown-paste.png.webp?itok=dFcBNcbz'
        width: '865'
        height: '733'
      datePublished: '2026-06-10T12:03:07+0200'
      dateModified: '2026-07-09T15:22:19+0200'
      author:
        '@type': Person
        name: 'Jorge Tutor'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
      mainEntityOfPage: 'https://metadrop.net/en/articles/ckeditor5-markdown-explicit-markdown-to-html-conversion-for-drupal-editors'
    -
      '@type': Organization
      '@id': 'https://metadrop.net/#organization'
      url: 'https://metadrop.net/'
      name: Metadrop
      sameAs:
        - 'https://www.drupal.org/metadrop'
        - 'https://twitter.com/metadrop'
        - 'https://asociaciondrupal.es/partner/metadrop'
        - 'https://www.linkedin.com/company/metadrop'
      logo:
        '@type': ImageObject
        url: 'https://metadrop.net/themes/custom/mdrop_radix/logo-metadrop-500-500.jpg'
        width: '500'
        height: '500'
    -
      '@type': ItemPage
      '@id': 'https://metadrop.net/en/articles/ckeditor5-markdown-explicit-markdown-to-html-conversion-for-drupal-editors'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Home
            item: 'https://metadrop.net/en'
          -
            '@type': ListItem
            position: 2
            name: 'Expert Drupal & Tech Articles'
            item: 'https://metadrop.net/en/articles'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
---
 1. [Articles](https://metadrop.net/en/articles)
 
  

# CKEditor5 Markdown: explicit Markdown-to-HTML conversion for Drupal editors

Wednesday, June 10, 2026

 

 



CKEditor5 Markdown is a new Drupal contrib module that adds CKEditor5 toolbar plugin into the toolbar for converting Markdown to HTML on demand.





   



## What the CKEditor5 Markdown module does

The module adds a new toolbar button to Drupal's CKEditor5 editor. Click it, paste or type Markdown into the dialog that appears, confirm, and the content is inserted as formatted HTML at the cursor position.

The conversion uses the `marked` library (version 9, MIT licence) with GitHub-Flavored Markdown support enabled. The library is bundled into the compiled asset via Webpack, so no additional frontend build step is required.

The module requires Drupal 10.3 or higher, or Drupal 11, with the core `ckeditor5` module enabled.

  

CKEditor5 markdown example

 

 

## Why explicit conversion instead of the official Paste Markdown feature

CKEditor5 includes a built-in [Paste Markdown](https://ckeditor.com/docs/ckeditor5/latest/features/pasting/paste-markdown.html) feature that detects Markdown in the clipboard and converts it on paste.

That feature is still experimental. Not all Markdown constructs are reliably detected. Some text blocks pass through without any conversion. The auto-detection heuristics can also interact with other active plugins: *Paste from Office*, *Paste from Google Docs*, and *Autoformatting* can all interfere, producing inconsistent results depending on which plugin set is active.

This module takes a deliberate approach. Editors **trigger the conversion intentionally** by clicking the toolbar button, pasting Markdown into the dialog, and confirming. There is no *clipboard sniffing*, no *heuristic guessing*, no *edge cases from competing* plugins.

Other Drupal modules support Markdown in CKEditor5, but they take a different tradeoff: they restrict the editor to *Markdown-only* output, or allow mixed formats in ways that can create output conflicts. That approach works for a personal site where one person controls both the content and the format. It may not work reliably for a corporate website where editorial teams mix content sources and output consistency matters.

## How to install and configure the module

You can install, as always, using Composer:

```bash
composer require drupal/ckeditor5_markdown
drush en ckeditor5_markdown

```

The module can also be enabled through the Drupal admin UI after the Composer step.

To configure the editor, go to **Administration &gt; Configuration &gt; Content authoring &gt; Text formats** and editors. Edit the text format that uses CKEditor5 and **drag the Paste Markdown button** into the active toolbar.

 

 

CKEditor5 filters the HTML it accepts based on the plugins and features enabled in its configuration. The module converts Markdown to HTML, but **CKEditor5 will silently strip any elements that are not permitted by the active plugin set**. For example, a `# Heading 1` in the Markdown only inserts as an `<h1>` element if the Heading plugin is enabled and `<h1>` is configured as an allowed heading level. Review your CKEditor5 toolbar and plugin configuration before using the button to confirm that the HTML elements corresponding to your intended Markdown are permitted.

## Final thoughts

Explicit Markdown conversion is more predictable than auto-detection for any editor working in a mixed-format environment. The module fills a specific gap: reliable, intentional Markdown-to-HTML for Drupal and CKEditor5, without locking the site into Markdown-only output or accepting the unpredictability of experimental clipboard detection.

I built this module because Markdown to Drupal is my daily workflow: content drafted in Markdown, often with AI assistance, then pasted into CKEditor5 for final editing and publishing. This module is part of the same content-first authoring philosophy as the [Content First](https://www.drupal.org/project/content_first) module.

Try the module: [https://www.drupal.org/project/ckeditor5\_markdown](https://www.drupal.org/project/ckeditor5_markdown)



 [      Download 2026 Drupal Ckeditor5-markdown module (PDF, 613.77 KB)  ](https://metadrop.net/sites/default/files/2026-07/2026-drupal-module-ckeditor5-markdown.pdf)

 

[Drupal](https://metadrop.net/en/articles?text=Drupal)

[CKEditor](https://metadrop.net/en/articles?text=CKEditor)

[Markdown](https://metadrop.net/en/articles?text=Markdown)

 

- Jorge Tutor
    
    CIO
 
 One partner across the Drupal lifecycle 

[Drupal development, solutions and support across the platform lifecycle](https://metadrop.net/en/services/drupal " See Drupal development, solutions and support across the platform lifecycle")

Metadrop is a Drupal specialist covering the whole platform lifecycle: architecture advice, build, multisite and headless solutions, version upgrades and long-term maintenance for organizations running business-critical Drupal in Europe.

 

 See more