ezoterik/yii2-easymde

Easy MarkDown Editor for Yii2

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.0 2021-03-28 06:07 UTC

This package is auto-updated.

Last update: 2021-08-28 07:13:12 UTC


README

Widget based on Easy MarkDown Editor

Latest Stable Version Total Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist ezoterik/yii2-easymde "*"

or add

"ezoterik/yii2-easymde": "*"

to the require section of your composer.json.

Usage

Once the extension is installed, simply add widget to your page as follows:

  1. Usage with ActiveForm and model
<?php
echo $form->field($model, 'content')->widget(\ezoterik\easymde\EasyMDE::class, [
    'editorOptions' => [
        'showIcons' => ["code", "table"],
    ],
]);
?>
  1. Usage without ActiveForm and model
<?php
echo \ezoterik\easymde\EasyMDE::widget([
    'name' => 'markdown-editor',
    'editorOptions' => [
        'showIcons' => ["code", "table"],
    ],
]);
?>

Markdown Editor Options

You can find them on the options page