dungphanxuan/yii2-lepture-editor

编辑器不是一个所见即所得编辑器,它是一个纯文本Markdown编辑器。感谢伟大的项目codemirror,没有它编辑器无法创建。

安装数量: 1,648

依赖关系: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放性问题: 0

语言:JavaScript

类型:yii2-extension

0.1 2015-06-30 02:22 UTC

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 扩展和开发