Skip to content

dungphanxuan/yii2-lepture-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

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

About

Yii2 widget lepture markdown editor

Resources

Stars

Watchers

Forks

Packages

No packages published