PHPackages                             weison-tech/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. weison-tech/yii2-imperavi-widget

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

weison-tech/yii2-imperavi-widget
================================

The imperavi redactor widget for Yii 2 framework.

1.2.11(9y ago)018BSD-3-ClauseJavaScript

Since Jul 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/weison-tech/yii2-imperavi-widget)[ Packagist](https://packagist.org/packages/weison-tech/yii2-imperavi-widget)[ Docs](https://github.com/weison-tech/yii2-imperavi-widget)[ RSS](/packages/weison-tech-yii2-imperavi-widget/feed)WikiDiscussions master Synced today

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

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

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

`Imperavi Redactor Widget` is a wrapper for [Imperavi Redactor](http://imperavi.com/redactor/), 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 weison-tech/yii2-imperavi-widget "*"
```

or add

```
"weison-tech/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 \vova07\imperavi\Widget::widget([
    'name' => 'redactor',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'plugins' => [
            'clips',
            'fullscreen'
        ]
    ]
]);
```

### Like an ActiveForm widget

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

```
use vova07\imperavi\Widget;

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

### Like a widget for a predefined textarea

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

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

### Add images that have already been uploaded

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

```
// DefaultController.php
public function actions()
{
    return [
        'images-get' => [
            'class' => 'vova07\imperavi\actions\GetAction',
            '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.
            'type' => GetAction::TYPE_IMAGES,
        ]
    ];
}

// View.php
echo \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        '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' => 'vova07\imperavi\actions\GetAction',
            '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.
            'type' => GetAction::TYPE_FILES,
        ]
    ];
}

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

### Upload image

[](#upload-image)

```
// DefaultController.php
public function actions()
{
    return [
        'image-upload' => [
            'class' => 'vova07\imperavi\actions\UploadAction',
            '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 \vova07\imperavi\Widget::widget([
    'selector' => '#my-textarea-id',
    'settings' => [
        'lang' => 'ru',
        'minHeight' => 200,
        'imageUpload' => Url::to(['/default/image-upload'])
    ]
]);
```

### Upload file

[](#upload-file)

```
// DefaultController.php
public function actions()
{
    return [
        'file-upload' => [
            'class' => 'vova07\imperavi\actions\UploadAction',
            '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 not image-only uploading.
        ],
    ];
}

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

### Add custom plugins

[](#add-custom-plugins)

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

Testing
-------

[](#testing)

```
$ phpunit
```

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

[](#further-information)

Please, check the [Imperavi Redactor](http://imperavi.com/redactor/) documentation for further information about its configuration options.

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

[](#contributing)

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

Credits
-------

[](#credits)

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

License
-------

[](#license)

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

> [![YiiWheels](https://camo.githubusercontent.com/5661871ec7fa7d73a09528e76062be43cb79c941990004527a89807c0dc3d28a/687474703a2f2f796969776865656c732e636f6d2f696d672f6c6f676f2d6269672e706e67)](http://yiiwheels.com)
> [Available also on YiiWheels](http://yiiwheels.com)

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 89% 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 ~26 days

Recently: every ~81 days

Total

27

Last Release

3595d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad2af46e2068dc147a65dd1113be09f39b8da08b7e1e43179152f022ff027bd4?d=identicon)[xiaomalover](/maintainers/xiaomalover)

---

Top Contributors

[![vova07](https://avatars.githubusercontent.com/u/2714082?v=4)](https://github.com/vova07 "vova07 (65 commits)")[![maxmirazh33](https://avatars.githubusercontent.com/u/2692282?v=4)](https://github.com/maxmirazh33 "maxmirazh33 (4 commits)")[![xiaomalover](https://avatars.githubusercontent.com/u/10594451?v=4)](https://github.com/xiaomalover "xiaomalover (2 commits)")[![aaiyo](https://avatars.githubusercontent.com/u/1450687?v=4)](https://github.com/aaiyo "aaiyo (1 commits)")[![ElisDN](https://avatars.githubusercontent.com/u/1673552?v=4)](https://github.com/ElisDN "ElisDN (1 commits)")

---

Tags

yii2extensionwidgetyiiwysiwygyii 2Redactorimperavi

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

249970.2k39](/packages/vova07-yii2-imperavi-widget)[yiidoc/yii2-redactor

Extension redactor for Yii2 Framework.

186612.4k46](/packages/yiidoc-yii2-redactor)

PHPackages © 2026

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