PHPackages                             runio/mde - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. runio/mde

ActiveSymfony-bundle[Parsing &amp; Serialization](/categories/parsing)

runio/mde
=========

A Symfony bundle providing a Markdown editor with WYSIWYG capabilities and first-class RTL/LTR support

v1.0.2(3mo ago)010MITPHPPHP ^8.1

Since Mar 11Pushed 3mo agoCompare

[ Source](https://github.com/RunIO-dev/runio-mde)[ Packagist](https://packagist.org/packages/runio/mde)[ Docs](https://github.com/RunIO-dev/runio-mde)[ RSS](/packages/runio-mde/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (13)Versions (4)Used By (0)

Runio MDE - Markdown Editor Bundle
==================================

[](#runio-mde---markdown-editor-bundle)

[![Latest Version](https://camo.githubusercontent.com/268243bb3165c13e9139a26d428e37ef632e2473c0ba09a7f897e66373e659ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72756e696f2f6d64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/runio/mde)[![License](https://camo.githubusercontent.com/1a7ad3687efdb07ec9bc2c55985f511d4e659bb78360e1e086c89e147f3f00d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72756e696f2f6d64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/runio/mde)[![PHP Version](https://camo.githubusercontent.com/ca9c79d95f5e6280d464e84c3d024267347dec3c83a6432a3b28429756221209/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72756e696f2f6d64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/runio/mde)[![Symfony Version](https://camo.githubusercontent.com/ce49b30cfa77928df0c35422888c063cfff1efccb7eb124e19a737ef65342af6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d362e30253230253743253230372e302d707572706c652e7376673f7374796c653d666c61742d737175617265)](https://symfony.com/)[![Tests](https://camo.githubusercontent.com/4de4b540ea0400fd1bc4585ebc7bf5ad01a8ad02cddd5c5e5f7348efa0171c4a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d3131392532307061737365642d737563636573732e7376673f7374796c653d666c61742d737175617265)](tests/)

A Symfony bundle providing a **WYSIWYG Markdown editor** with **first-class RTL and LTR support** for Arabic, Hebrew, Persian, Urdu, and all LTR languages. Built on top of [Toast UI Editor](https://github.com/nhn/tui.editor) with deep Symfony integration.

---

Why This Bundle?
----------------

[](#why-this-bundle)

- **Perfect RTL + LTR Support** - Designed for Arabic, Hebrew, Persian, Urdu, and all LTR content
- **WYSIWYG &amp; Markdown** - Switch between visual editing and markdown mode seamlessly
- **Security First** - Built-in XSS protection and HTML sanitization
- **Highly Customizable** - Themes, toolbars, preview modes, and more
- **Production Ready** - 119 tests, fully documented
- **Easy Integration** - Drop-in Symfony Form Type, ready in minutes
- **Multi-language** - Automatic RTL detection, mixed LTR/RTL content support

---

Requirements
------------

[](#requirements)

- **PHP:** 8.1 or higher
- **Symfony:** 6.0 or 7.0+
- **Composer:** 2.0 or higher

---

Installation
------------

[](#installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
composer require runio/mde
```

### Step 2: Enable the Bundle (Symfony Flex does this automatically)

[](#step-2-enable-the-bundle-symfony-flex-does-this-automatically)

If you're not using Symfony Flex, manually enable the bundle:

```
// config/bundles.php
return [
    // ...
    Runio\MarkdownEditorBundle\RunioMarkdownEditorBundle::class => ['all' => true],
];
```

### Step 3: Install Assets

[](#step-3-install-assets)

```
php bin/console assets:install --symlink
```

### Step 4: Register Form Theme

[](#step-4-register-form-theme)

```
# config/packages/twig.yaml
twig:
    form_themes:
        - '@RunioMarkdownEditor/form/markdown_editor_widget.html.twig'
```

---

Quick Start
-----------

[](#quick-start)

### 1. Create a Form Type

[](#1-create-a-form-type)

```
use Runio\MarkdownEditorBundle\Form\Type\MarkdownEditorType;

class PostType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            ->add('title')
            ->add('content', MarkdownEditorType::class, [
                'rtl_enabled' => true,
                'language' => 'ar',
                'editor_height' => '500px',
            ]);
    }
}
```

### 2. Render in Template

[](#2-render-in-template)

```
{{ form_start(form) }}
    {{ form_row(form.title) }}
    {{ form_row(form.content) }}
    Save
{{ form_end(form) }}
```

### 3. Display Rendered Content

[](#3-display-rendered-content)

```
{{ post.content|markdown }}
```

---

Configuration
-------------

[](#configuration)

```
# config/packages/runio_markdown_editor.yaml
runio_markdown_editor:
    default_config:
        editor_height: '500px'
        editor_mode: 'wysiwyg'       # wysiwyg, markdown, or both
        rtl_enabled: true
        language: 'ar'
        toolbar: 'full'              # full, basic, minimal
        preview_style: 'vertical'    # vertical or tab
        theme: 'light'               # light or dark
        enable_upload: false
        upload_url: null

    markdown:
        html_input: 'escape'
        allow_unsafe_links: false
        enable_table_extension: true
        enable_strikethrough_extension: true
        enable_tasklist_extension: true
        enable_autolink_extension: true

    rtl:
        languages: ['ar', 'he', 'fa', 'ur']
        auto_detect: true
        arabic_font: 'Noto Naskh Arabic'

    sanitization:
        enabled: true
        allowed_tags: [p, br, strong, em, u, s, blockquote, ul, ol, li, a, img, h1, h2, h3, h4, h5, h6, pre, code, table, thead, tbody, tr, th, td, hr, div, span]
        allowed_attributes: [href, src, alt, title, class, id, dir, lang]
```

### Per-Field Override

[](#per-field-override)

```
$builder->add('content', MarkdownEditorType::class, [
    'editor_height' => '600px',
    'editor_mode' => 'both',
    'theme' => 'dark',
    'toolbar' => 'basic',
    'rtl_enabled' => true,
    'language' => 'ar',
]);
```

---

Twig Integration
----------------

[](#twig-integration)

### Filters

[](#filters)

```
{{ post.content|markdown }}
{{ post.summary|markdown_inline }}
```

### Functions

[](#functions)

```
{% set html = markdown_to_html(post.content) %}
{% if detect_rtl(post.content) %}
    {{ html }}
{% endif %}
```

---

Security
--------

[](#security)

All HTML output is sanitized by default:

- Script tag removal
- Event handler blocking (onclick, onerror, etc.)
- JavaScript URL blocking
- Whitelist-based tag and attribute filtering
- Safe URL validation (http, https, mailto, tel only)

---

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

119 tests covering: Form Type (24), Markdown Parser (23), RTL Detector (16), Sanitization (34), Twig Runtime (22).

---

Documentation
-------------

[](#documentation)

- [Installation Guide](docs/installation.md)
- [Configuration Reference](docs/configuration.md)
- [Usage Examples](docs/usage.md)
- [Quick Start](QUICKSTART.md)
- [Changelog](CHANGELOG.md)

---

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Write tests for your changes
4. Ensure all tests pass (`vendor/bin/phpunit`)
5. Commit and push
6. Open a Pull Request

---

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

---

Credits
-------

[](#credits)

- [Toast UI Editor](https://github.com/nhn/tui.editor)
- [CommonMark PHP](https://commonmark.thephpleague.com/)
- [Symfony Framework](https://symfony.com/)

---

**Made for the multilingual developer community by [RunIO](https://github.com/RunIO-dev)**

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance81

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

99d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/746602d291416e3301cc69d079826fa17431378962eec99029f03f65f8813145?d=identicon)[amer](/maintainers/amer)

---

Top Contributors

[![amermmohammed](https://avatars.githubusercontent.com/u/81410703?v=4)](https://github.com/amermmohammed "amermmohammed (9 commits)")

---

Tags

editormarkdownrtlsymfonysymfony-bundlewysiwygsymfonybundlemarkdowneditorwysiwygarabichebrewrtlForm Typetoast-uiright-to-leftltr

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/runio-mde/health.svg)

```
[![Health](https://phpackages.com/badges/runio-mde/health.svg)](https://phpackages.com/packages/runio-mde)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1715.6k12](/packages/2lenet-crudit-bundle)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[forumify/forumify-platform

122.0k12](/packages/forumify-forumify-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
