dungphanxuan / yii2-editor
Yii2 Markdow editor base on bootstrap plugin for markdown editing.
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-03 07:21:44 UTC
README
Markdown editing meet Bootstrap.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist dungphanxuan/yii2-editor "*"
or add
"dungphanxuan/yii2-editor": "dev-master"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?php echo dungphanxuan\yii2editor\MarkDownEditorWidget::widget([ 'name' => 'content', 'options'=>[// html attributes 'id'=>'content', 'rows'=>'5', 'placeholder'=>'Leave a comment', 'data-provide'=>'markdown', ], ]);; ?>
or use with a model:
<?php echo dungphanxuan\yii2editor\MarkDownEditorWidget::widget([ 'model' => $model, 'attribute' => 'content', 'options'=>[// html attributes 'id'=>'content', 'rows'=>'5', 'placeholder'=>'Leave a comment', 'data-provide'=>'markdown', ], ]);; ?>
Demo and documentation on http://toopay.github.io/bootstrap-markdown/
LICENSE
Copyright 2013-2014 Taufan Aditya
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.