dungphanxuan/yii2-lepture-editor

Editor is not a WYSIWYG editor, it is a plain text markdown editor. Thanks for the great project codemirror, without which editor can never be created.

Installs: 1 415

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

0.1 2015-06-30 02:22 UTC

This package is not auto-updated.

Last update: 2024-03-20 06:40:22 UTC


README

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist dungphanxuan/yii2-lepture-editor "*"

or add

"dungphanxuan/yii2-lepture-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\leptureeditor\LeptureEditorWidget::widget([
    'name' => 'content',
    'options'=>[// html attributes
        'id'=>'content'
    ],
    'leptureOptions' => [
                        'toolbar' => false
                    ]
]);; ?>

or use with a model:

<?php echo dungphanxuan\leptureeditor\LeptureEditorWidget::widget([
    'model' => $model,
    'attribute' => 'content',
    'options'=>[// html attributes
        'id'=>'content'
    ],
    'leptureOptions' => [
                        'toolbar' => false
                    ]
]);; ?>

For full details on usage, see the documentation.

License

MIT. Copyright (c) 2013 - 2014 by Hsiaoming Yang. Extends and develope by dungphanxuan