ijackua / yii2-lepture-markdown-editor-widget
Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want
Installs: 2 450
Dependents: 2
Suggesters: 0
Security: 0
Stars: 49
Watchers: 2
Forks: 5
Open Issues: 1
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2022-02-01 12:33:27 UTC
README
Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want
Demo
on 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
use ijackua\lepture\Markdowneditor; Markdowneditor::widget( [ 'model' => $model, 'attribute' => 'full_text', ])
Simple widget
use ijackua\lepture\Markdowneditor; Markdowneditor::widget( [ 'name' => 'editor', 'value' => '# Hello world' ])
Editor options
see on official site
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
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.