dungphanxuan / yii2-lepture-editor
编辑器不是一个所见即所得编辑器,它是一个纯文本Markdown编辑器。感谢伟大的项目codemirror,没有它编辑器无法创建。
0.1
2015-06-30 02:22 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-18 08:58:52 UTC
README
安装此扩展的首选方式是通过 composer。
运行以下命令
php composer.phar require --prefer-dist dungphanxuan/yii2-lepture-editor "*"
或者在您的 composer.json
文件的 require 部分添加
"dungphanxuan/yii2-lepture-editor": "dev-master"
。
使用方法
扩展安装完成后,您只需在代码中使用即可
<?php echo dungphanxuan\leptureeditor\LeptureEditorWidget::widget([ 'name' => 'content', 'options'=>[// html attributes 'id'=>'content' ], 'leptureOptions' => [ 'toolbar' => false ] ]);; ?>
或者与模型一起使用
<?php echo dungphanxuan\leptureeditor\LeptureEditorWidget::widget([ 'model' => $model, 'attribute' => 'content', 'options'=>[// html attributes 'id'=>'content' ], 'leptureOptions' => [ 'toolbar' => false ] ]);; ?>
有关使用方法的详细信息,请参阅 文档。
许可协议
MIT. 版权 (c) 2013 - 2014 由 Hsiaoming Yang 所有。由 dungphanxuan 扩展和开发