<commit_before>Yii2 Lepture Markdown Editor widget
---

Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want

## Demo

on [http://lab.lepture.com/editor/](http://lab.lepture.com/editor/)

## Installation via Composer
add to `require` section of your `composer.json`
`"ijackua/yii2-lepture-markdown-editor-widget"`
and run composer update

## Usage example

### Active widget

```php
use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'model' => $model,
				'attribute' => 'full_text',
			])
```

### Simple widget

```php
use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'name' => 'editor',
				'value' => '# Hello world'
			])
```

## Available options

see on [official site](https://github.com/lepture/editor)

## Available Marked options (markdown parser used by EpicEditor)<commit_msg>fix readme<commit_after>Yii2 Lepture Markdown Editor widget
---

Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want

## Demo

on [http://lab.lepture.com/editor/](http://lab.lepture.com/editor/)

## Installation via Composer
add to `require` section of your `composer.json`
`"ijackua/yii2-lepture-markdown-editor-widget"`
and run composer update

## Usage example

### Active widget

```php
use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'model' => $model,
				'attribute' => 'full_text',
			])
```

### Simple widget

```php
use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'name' => 'editor',
				'value' => '# Hello world'
			])
```

## Available options

see on [official site](https://github.com/lepture/editor)

## Available Marked options (markdown parser used by Lepture Editor)
{'fraction_non_alphanumeric': 0.14839797639123103, 'fraction_numerical': 0.003372681281618887, 'mean_word_length': 4.189504373177843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3967986', 'n_tokens_mistral': 660, 'n_tokens_neox': 599, 'n_words': 147}