PHPackages                             montyxrizzo/yii2-markdown - 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. montyxrizzo/yii2-markdown

ActiveYii2-extension[Parsing &amp; Serialization](/categories/parsing)

montyxrizzo/yii2-markdown
=========================

Advanced Markdown editing and conversion utilities for Yii Framework 2.0

v1.3.0(11y ago)013BSD 3-ClausePHP

Since Oct 5Pushed 10y agoCompare

[ Source](https://github.com/montyxrizzo/yii2-markdown)[ Packagist](https://packagist.org/packages/montyxrizzo/yii2-markdown)[ Docs](https://github.com/kartik-v/yii2-markdown)[ RSS](/packages/montyxrizzo-yii2-markdown/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

yii2-markdown
=============

[](#yii2-markdown)

[![Latest Stable Version](https://camo.githubusercontent.com/9e27344fb219ed4738e3cd32d2468eac1d7ad4cb25177c74aa3bd6626373e00c/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6d61726b646f776e2f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-markdown)[![License](https://camo.githubusercontent.com/4f81fce14fead2c6544e0e4570f5a3340d651f3288cd8977a09c8e7b01b4a39b/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6d61726b646f776e2f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-markdown)[![Total Downloads](https://camo.githubusercontent.com/8d6d6b13357331e8b3bfadbb4737e939b6a0a67ac142ece162df807547f30341/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6d61726b646f776e2f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-markdown)[![Monthly Downloads](https://camo.githubusercontent.com/1f5b42e9f91f93bd2a533e4d21f7a62e105ce3ecf8162caf8729c44819d31844/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6d61726b646f776e2f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-markdown)[![Daily Downloads](https://camo.githubusercontent.com/47d35806b5162594de15bf6f2536d4e6f06a856fbab9bc7e6c7fcb0a2feb926d/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6d61726b646f776e2f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-markdown)

This module provides Markdown Editing and Conversion utilities for Yii Framework 2.0. It implements markdown conversion using PHP Markdown Extra and PHP Smarty Pants. In addition, you can customize the flavor of Markdown, by including additional custom conversion patterns. The module also includes an enhanced customized Markdown Editor Widget for markdown editing and preview at runtime. This widget is styled using Bootstrap 3.0. View a [complete demo](http://demos.krajee.com/markdown-demo).

### Markdown

[](#markdown)

[`VIEW DEMO`](http://demos.krajee.com/markdown-details/markdown-converter)
This is a markdown converter class that uses [PHP Markdown Extra](http://michelf.ca/projects/php-markdown/extra/) and [PHP SmartyPantsTypographer](http://michelf.ca/projects/php-smartypants/typographer/) for processing Markdown conversion to HTML. It also supports configurable custom conversion processing of patterns for styling your own flavour of Markdown to some extent. View [examples and details](http://demos.krajee.com/markdown-details/markdown-converter) or view a [complete demo](http://demos.krajee.com/markdown-demo).

### MarkdownEditor

[](#markdowneditor)

[`VIEW DEMO`](http://demos.krajee.com/markdown-details/markdown-editor)
This is an advanced markdown input widget with configurable options. It is styled using Bootstrap 3.0. Key features available with this widget are:

1. Configurable toolbar and buttons for formatting content
2. Live preview of Markdown formatted text as HTML
3. Maximize editor for full screen editing
4. Implements PHP Markdown Extra and PHP SmartyPantsTypographer functionality as provided by the Markdown.
5. Uses Bootstrap 3.0 styling wherever possible
6. Allows saving/exporting of the text-editor contents as Text or HTML
7. Configurable header, footer, and input options.
8. Supports localization and customization of messages and content.

View [examples and details](http://demos.krajee.com/markdown-details/markdown-editor) or view a [complete demo](http://demos.krajee.com/markdown-demo).

### Demo

[](#demo)

You can see a [demonstration here](http://demos.krajee.com/markdown) on usage of these functions with documentation and examples.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

> Note: Check the [composer.json](https://github.com/kartik-v/yii2-markdown/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

Either run

```
$ php composer.phar require kartik-v/yii2-markdown "dev-master"

```

or add

```
"kartik-v/yii2-markdown": "dev-master"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Setup Module

[](#setup-module)

Add `markdown` to your modules section of your Yii configuration file

```
'modules' = [
	/* other modules */
	'markdown' => [
		'class' => 'kartik\markdown\Module',
	]
];
```

You can setup additional configuration options for the `markdown` module:

```
'modules' = [
	'markdown' => [
		// the module class
		'class' => 'kartik\markdown\Module',

		// the controller action route used for markdown editor preview
		'previewAction' => '/markdown/parse/preview',

		// the list of custom conversion patterns for post processing
		'customConversion' => [
			'' => ''
		],

		// whether to use PHP SmartyPantsTypographer to process Markdown output
		'smartyPants' => true
	]
	/* other modules */
];
```

### Markdown

[](#markdown-1)

```
use kartik\markdown\Markdown;

// default call
echo Markdown::convert($content);

// with custom post processing
echo Markdown::convert($content, ['custom' => [
	'' => '',
]]);
```

### MarkdownEditor

[](#markdowneditor-1)

```
// add this in your view
use kartik\markdown\MarkdownEditor;

// usage with model
echo MarkdownEditor::widget([
	'model' => $model,
	'attribute' => 'markdown',
]);

// usage without model
echo MarkdownEditor::widget([
	'name' => 'markdown',
	'value' => $value,
]);
```

License
-------

[](#license)

**yii2-markdown** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 91.9% 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 ~20 days

Total

6

Last Release

4145d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/489cda75eef75ce4ad989e5014b0da956158c8ac2dae57c05951d65bf5fb846d?d=identicon)[montyxrizzo](/maintainers/montyxrizzo)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (113 commits)")[![montyxrizzo](https://avatars.githubusercontent.com/u/9725120?v=4)](https://github.com/montyxrizzo "montyxrizzo (3 commits)")[![drenty](https://avatars.githubusercontent.com/u/1330021?v=4)](https://github.com/drenty "drenty (2 commits)")[![lestat1968](https://avatars.githubusercontent.com/u/7681695?v=4)](https://github.com/lestat1968 "lestat1968 (1 commits)")[![andrew72ru](https://avatars.githubusercontent.com/u/567649?v=4)](https://github.com/andrew72ru "andrew72ru (1 commits)")[![RichWeber](https://avatars.githubusercontent.com/u/1702252?v=4)](https://github.com/RichWeber "RichWeber (1 commits)")[![chris68](https://avatars.githubusercontent.com/u/1455561?v=4)](https://github.com/chris68 "chris68 (1 commits)")[![janoszab](https://avatars.githubusercontent.com/u/3897821?v=4)](https://github.com/janoszab "janoszab (1 commits)")

---

Tags

convertermarkdownjqueryyii2extensionyiieditorbootstrapforminput

### Embed Badge

![Health badge](/badges/montyxrizzo-yii2-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/montyxrizzo-yii2-markdown/health.svg)](https://phpackages.com/packages/montyxrizzo-yii2-markdown)
```

###  Alternatives

[kartik-v/yii2-markdown

Advanced Markdown editing and conversion utilities for Yii Framework 2.0

88265.8k6](/packages/kartik-v-yii2-markdown)[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

791.2M17](/packages/kartik-v-yii2-password)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/yii2-widget-fileinput

An enhanced FileInput widget for Bootstrap 3.x, 4.x &amp; 5.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)

2286.8M95](/packages/kartik-v-yii2-widget-fileinput)[kartik-v/yii2-widget-touchspin

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle touchspines (sub repo split from yii2-widgets)

184.1M6](/packages/kartik-v-yii2-widget-touchspin)

PHPackages © 2026

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