suver/yii2-editor

yii2-editor

Installs: 78

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:HTML

Type:yii2-extension

1.0.3 2017-03-17 11:45 UTC

This package is not auto-updated.

Last update: 2024-11-23 21:20:32 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require suver/yii2-editor

or add

"suver/yii2-editor": "*"

to the require section of your composer.json file.

Usage

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

View:

<?php $form = ActiveForm::begin(); ?>

<?= $form->field($model, 'content')->widget('suver\editor\Markdown', [
    'mdeOptions' => [
        //'autofocus' => true,
        // see https://github.com/NextStepWebs/simplemde-markdown-editor
    ]
])->label(false) ?>

<div class="form-group">
    <?= Html::submitButton('Create', ['class' => 'btn btn-primary']) ?>
</div>

<?php ActiveForm::end(); ?>
 <?php echo \suver\editor\TransformationWidget::widget(['message' => $text]) ?>

Further Information

Please, check the simplemde-markdown-editor documentation for further information about its configuration options.

Demo

See https://simplemde.com/