PHPackages                             venodon/yii2-imperavi-widget - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. venodon/yii2-imperavi-widget

ActiveYii2-extension[Framework](/categories/framework)

venodon/yii2-imperavi-widget
============================

The imperavi redactor widget for Yii 2 framework.

2.0.11(7y ago)0476↓100%BSD-3-ClauseJavaScript

Since Jul 5Pushed 4y agoCompare

[ Source](https://github.com/venodon/yii2-imperavi-widget)[ Packagist](https://packagist.org/packages/venodon/yii2-imperavi-widget)[ Docs](https://github.com/vova07/yii2-imperavi-widget)[ RSS](/packages/venodon-yii2-imperavi-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (42)Used By (0)

Imperavi Redactor Widget for Yii 2
==================================

[](#imperavi-redactor-widget-for-yii-2)

[![Latest Version](https://camo.githubusercontent.com/268d39937d8faada8a9aee4901457b5fc53dac05908c298784bc1884fa93c81b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f76656e6f646f6e2f796969322d696d7065726176692d7769646765742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/venodon/yii2-imperavi-widget/releases)[![Software License](https://camo.githubusercontent.com/b60331a2084501dc07cf6d6964c0da58dd005d89c45cf3b28b4b22b60f5ec00f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/92ebc8a628304aad84dc6c2fd4f15377f7c49c734e41ac2664f8597c4d17f501/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76656e6f646f6e2f796969322d696d7065726176692d7769646765742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/venodon/yii2-imperavi-widget)[![Coverage Status](https://camo.githubusercontent.com/883436c15eca3a7944d637ee0161b3d1e57de4827225062d2da1201ff0516386/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f76656e6f646f6e2f796969322d696d7065726176692d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/venodon/yii2-imperavi-widget/code-structure)[![Quality Score](https://camo.githubusercontent.com/dcd1b51d4a35ad8ed3c1581c8b48117b8dbfc8214b7ab78131f7903b77b133ff/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f76656e6f646f6e2f796969322d696d7065726176692d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/venodon/yii2-imperavi-widget)[![Total Downloads](https://camo.githubusercontent.com/8c4fc74c184f16659df5ea59354dd71979a4964e3f1bd192ebf9298c43c41731/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656e6f646f6e2f796969322d696d7065726176692d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/venodon/yii2-imperavi-widget)

`Imperavi Redactor Widget` is a wrapper for [Imperavi Redactor 10.2.5](https://imperavi.com/assets/pdf/redactor-documentation-10.pdf), a high quality WYSIWYG editor.

**Note that Imperavi Redactor itself is a proprietary commercial copyrighted software but since Yii community bought OEM license you can use it for free with Yii.**

Install
-------

[](#install)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require --prefer-dist venodon/yii2-imperavi-widget "*"
```

or add

```
"venodon/yii2-imperavi-widget": "*"
```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

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

### Like a widget

[](#like-a-widget)

```
echo \venodon\imperavi\Widget::widget([
    'name' => 'redactor',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen',
        ],
        'clips' => [
            ['Lorem ipsum...', 'Lorem...'],
            ['red', 'red'],
            ['green', 'green'],
            ['blue', 'blue'],
        ],
    ],
]);
```

### Like an ActiveForm widget

[](#like-an-activeform-widget)

```
use venodon\imperavi\Widget;

echo $form->field($model, 'content')->widget(Widget::className(), [
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen',
        ],
        'clips' => [
            ['Lorem ipsum...', 'Lorem...'],
            ['red', 'red'],
            ['green', 'green'],
            ['blue', 'blue'],
        ],
    ],
]);
```

### Like a widget for a predefined textarea

[](#like-a-widget-for-a-predefined-textarea)

```
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen',
        ],
        'clips' => [
            ['Lorem ipsum...', 'Lorem...'],
            ['red', 'red'],
            ['green', 'green'],
            ['blue', 'blue'],
        ],
    ],
]);
```

### Add images that have already been uploaded

[](#add-images-that-have-already-been-uploaded)

```
// DefaultController.php
public function actions()
{
    return [
        'images-get' => [
            'class' => 'venodon\imperavi\actions\GetImagesAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'options' => ['only' => ['*.jpg', '*.jpeg', '*.png', '*.gif', '*.ico']], // These options are by default.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'imageUpload' => Url::to(['default/image-upload']),
        'imageManagerJson' => Url::to(['/default/images-get']),
        'plugins' => [
            'imagemanager',
        ],
    ],
]);
```

### Add files that have already been uploaded

[](#add-files-that-have-already-been-uploaded)

```
// DefaultController.php
public function actions()
{
    return [
        'files-get' => [
            'class' => 'venodon\imperavi\actions\GetFilesAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'options' => ['only' => ['*.txt', '*.md']], // These options are by default.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileUpload' => Url::to(['default/file-upload']),
        'fileManagerJson' => Url::to(['/default/files-get']),
        'plugins' => [
            'filemanager',
        ],
    ],
]);
```

### Upload image

[](#upload-image)

```
// DefaultController.php
public function actions()
{
    return [
        'image-upload' => [
            'class' => 'venodon\imperavi\actions\UploadFileAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'imageUpload' => Url::to(['/default/image-upload']),
        'plugins' => [
            'imagemanager',
        ],
    ],
]);
```

### Upload file

[](#upload-file)

```
// DefaultController.php
public function actions()
{
    return [
        'file-upload' => [
            'class' => 'venodon\imperavi\actions\UploadFileAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'uploadOnlyImage' => false, // For any kind of files uploading.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileUpload' => Url::to(['/default/file-upload']),
        'plugins' => [
            'filemanager',
        ],
    ],
]);
```

### Upload and replace a file with the same name

[](#upload-and-replace-a-file-with-the-same-name)

```
// DefaultController.php
public function actions()
{
    return [
        'file-upload' => [
            'class' => 'venodon\imperavi\actions\UploadFileAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'uploadOnlyImage' => false, // For any kind of files uploading.
            'unique' => false,
            'replace' => true, // By default it throw an excepiton instead.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileUpload' => Url::to(['/default/file-upload']),
        'plugins' => [
            'filemanager',
        ],
    ],
]);
```

### Upload file and *translit* its name

[](#upload-file-and-translit-its-name)

```
// DefaultController.php
public function actions()
{
    return [
        'file-upload' => [
            'class' => 'venodon\imperavi\actions\UploadFileAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'uploadOnlyImage' => false, // For any kind of files uploading.
            'unique' => false,
            'translit' => true,
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileUpload' => Url::to(['/default/file-upload']),
        'plugins' => [
            'filemanager',
        ],
    ]
]);
```

### Add custom plugins

[](#add-custom-plugins)

```
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen'
        ]
    ],
    'plugins' => [
        'my-custom-plugin' => 'app\assets\MyPluginBundle',
    ],
]);
```

### Enable custom image manager with delete functionality

[](#enable-custom-image-manager-with-delete-functionality)

```
// DefaultController.php
public function actions()
{
    return [
        'images-get' => [
            'class' => 'venodon\imperavi\actions\GetImagesAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
        ],
        'image-upload' => [
            'class' => 'venodon\imperavi\actions\UploadFileAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
        ],
        'file-delete' => [
            'class' => 'venodon\imperavi\actions\DeleteFileAction',
            'url' => 'http://my-site.com/statics/', // Directory URL address, where files are stored.
            'path' => '/var/www/my-site.com/web/statics', // Or absolute path to directory where files are stored.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'imageUpload' => Url::to(['/default/image-upload']),
        'imageDelete' => Url::to(['/default/file-delete']),
        'imageManagerJson' => Url::to(['/default/images-get']),
    ],
    'plugins' => [
        'imagemanager' => 'venodon\imperavi\bundles\ImageManagerAsset',
    ],
]);
```

### Enable custom file manager with delete functionality

[](#enable-custom-file-manager-with-delete-functionality)

```
// DefaultController.php
public function actions()
{
    return [
        'files-get' => [
            'class' => 'venodon\imperavi\actions\GetFilesAction',
            'url' => 'http://my-site.com/images/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
        ],
        'file-upload' => [
            'class' => 'venodon\imperavi\actions\UploadFileAction',
            'url' => 'http://my-site.com/files/', // Directory URL address, where files are stored.
            'path' => '@alias/to/my/path', // Or absolute path to directory where files are stored.
            'uploadOnlyImage' => false, // For any kind of files uploading.
        ],
        'file-delete' => [
            'class' => 'venodon\imperavi\actions\DeleteFileAction',
            'url' => 'http://my-site.com/statics/', // Directory URL address, where files are stored.
            'path' => '/var/www/my-site.com/web/statics', // Or absolute path to directory where files are stored.
        ],
    ];
}

// View.php
echo \venodon\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'fileUpload' => Url::to(['/default/file-upload']),
        'fileDelete' => Url::to(['/default/file-delete']),
        'fileManagerJson' => Url::to(['/default/files-get']),
    ],
    'plugins' => [
        'filemanager' => 'venodon\imperavi\bundles\FileManagerAsset',
    ],
]);
```

Testing
-------

[](#testing)

```
$ phpunit
```

Further Information
-------------------

[](#further-information)

Please, check the [Imperavi Redactor v10](https://imperavi.com/assets/pdf/redactor-documentation-10.pdf) documentation for further information about its configuration options.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Vasile Crudu](https://github.com/venodon)
- [All Contributors](../../contributors)

License
-------

[](#license)

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.

Upgrade guide
-------------

[](#upgrade-guide)

Please check the [UPGRADE GUIDE](UPGRADE.md) for details.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 77% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Recently: every ~33 days

Total

41

Last Release

2604d ago

Major Versions

1.3.2 → 2.0.02017-12-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/848d2fb86728a1729ca8c75ebae4df458b2a2d31bd50a8bbddcf17ac0078a475?d=identicon)[suhov-as](/maintainers/suhov-as)

---

Top Contributors

[![vova07](https://avatars.githubusercontent.com/u/2714082?v=4)](https://github.com/vova07 "vova07 (87 commits)")[![venodon](https://avatars.githubusercontent.com/u/20688876?v=4)](https://github.com/venodon "venodon (8 commits)")[![maxmirazh33](https://avatars.githubusercontent.com/u/2692282?v=4)](https://github.com/maxmirazh33 "maxmirazh33 (4 commits)")[![onmotion](https://avatars.githubusercontent.com/u/12899080?v=4)](https://github.com/onmotion "onmotion (2 commits)")[![do6po](https://avatars.githubusercontent.com/u/23662926?v=4)](https://github.com/do6po "do6po (1 commits)")[![ElisDN](https://avatars.githubusercontent.com/u/1673552?v=4)](https://github.com/ElisDN "ElisDN (1 commits)")[![greeflas](https://avatars.githubusercontent.com/u/17636915?v=4)](https://github.com/greeflas "greeflas (1 commits)")[![hamrak](https://avatars.githubusercontent.com/u/5807028?v=4)](https://github.com/hamrak "hamrak (1 commits)")[![aaiyo](https://avatars.githubusercontent.com/u/1450687?v=4)](https://github.com/aaiyo "aaiyo (1 commits)")[![marcovtwout](https://avatars.githubusercontent.com/u/438046?v=4)](https://github.com/marcovtwout "marcovtwout (1 commits)")[![Sensetivity](https://avatars.githubusercontent.com/u/4289543?v=4)](https://github.com/Sensetivity "Sensetivity (1 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (1 commits)")[![jcvalerio](https://avatars.githubusercontent.com/u/2169894?v=4)](https://github.com/jcvalerio "jcvalerio (1 commits)")[![bocceli](https://avatars.githubusercontent.com/u/14825615?v=4)](https://github.com/bocceli "bocceli (1 commits)")[![bscheshirwork](https://avatars.githubusercontent.com/u/5769211?v=4)](https://github.com/bscheshirwork "bscheshirwork (1 commits)")[![codewec](https://avatars.githubusercontent.com/u/4204501?v=4)](https://github.com/codewec "codewec (1 commits)")

---

Tags

yii2extensionwidgetyiiwysiwygyii 2Redactorimperavi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/venodon-yii2-imperavi-widget/health.svg)

```
[![Health](https://phpackages.com/badges/venodon-yii2-imperavi-widget/health.svg)](https://phpackages.com/packages/venodon-yii2-imperavi-widget)
```

###  Alternatives

[vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

243979.7k40](/packages/vova07-yii2-imperavi-widget)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
