h0rseduck/yii2-tui-editor

Tui Editor for Yii2

Installs: 228

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 2

Type:yii2-extension

0.0.1 2019-07-01 14:04 UTC

This package is auto-updated.

Last update: 2024-05-29 04:28:22 UTC


README

Tui Editor for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist h0rseduck/yii2-tui-editor "*"

or add

"h0rseduck/yii2-tui-editor": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \h0rseduck\tuieditor\TuiEditor::widget([
    'editorOptions' => [
        'initialEditType' => 'markdown',
        'previewStyle' => 'vertical',
        'height' => '500px'
    ]
]); ?>
<?= $form->field($model, 'content')->widget(\h0rseduck\tuieditor\TuiEditor::class, [
    'editorOptions' => [
        'initialEditType' => 'markdown',
        'previewStyle' => 'vertical',
        'height' => '500px'
    ]
]); ?>