ofilin/yii2-quill

Quill Asset & Plugin

Installs: 198

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:yii2-extension

0.3.4 2020-11-23 19:18 UTC

This package is auto-updated.

Last update: 2024-09-24 03:51:16 UTC


README

This is fork of https://github.com/bizley/yii2-quill with local library of Quill and without Katex, Highlight plugins.

Yii 2 implementation of Quill, modern WYSIWYG editor.

Quill

You can find Quill at https://quilljs.com/

yii2-quill

  • Added Emoji support (Note: Register asset ofilin\quill\EmojiAsset on your pages edited with quill for correct display Emoji smiles)

Installation

Add the package to your composer.json:

{
    "require": {
        "ofilin/yii2-quill": "^0.3"
    }
}

and run composer update or alternatively run composer require ofilin/yii2-quill:^0.3

Usage

Use it as an active field extension

<?= $form->field($model, $attribute)->widget(\ofilin\quill\Quill::class, []) ?>

Or as a standalone widget

<?= \ofilin\quill\Quill::widget(['name' => 'editor', 'value' => '']) ?>

With Emoji plugin

<?= $form->field($model, 'text_msg')->label(false)->widget(\ofilin\quill\Quill::class, [
    'theme' => 'snow',
    'placeholder' => 'Text',
    'toolbarOptions' => [
        ["bold", "italic", "code", "link", "emoji"],
    ],
]) ?>