![Software License][ico-license]
, (*1)
Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want, (*2)
Demo
on http://lab.lepture.com/editor/, (*3)
Installation via Composer
add to require
section of your composer.json
"ijackua/yii2-lepture-markdown-editor-widget"
and run composer update, (*4)
Usage example
use ijackua\lepture\Markdowneditor;
Markdowneditor::widget(
[
'model' => $model,
'attribute' => 'full_text',
])
use ijackua\lepture\Markdowneditor;
Markdowneditor::widget(
[
'name' => 'editor',
'value' => '# Hello world'
])
Editor options
see on official site, (*5)
use ijackua\lepture\Markdowneditor;
Markdowneditor::widget(
[
'model' => $model,
'attribute' => 'full_text',
'leptureOptions' => [
'toolbar' => false
]
])
Marked options (markdown parser used by Lepture Editor)
see on official Marked site, (*6)
use ijackua\lepture\Markdowneditor;
Markdowneditor::widget(
[
'model' => $model,
'attribute' => 'full_text',
'markedOptions' => [
'tables' => false
]
])
Credits
License
The MIT License (MIT). Please see License File for more information., (*7)