ezoterik/yii2-easymde

Easy MarkDown Editor for Yii2

Installs: 687

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.1.0 2022-01-29 19:30 UTC

This package is auto-updated.

Last update: 2024-11-29 06:47: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