Tui Editor for Yii2
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.
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'
]
]); ?>