PHPackages                             sjaakp/yii2-wysiwyg - 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. [Templating &amp; Views](/categories/templating)
4. /
5. sjaakp/yii2-wysiwyg

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

sjaakp/yii2-wysiwyg
===================

Redactor editor for Yii2.x

1.0.2(6y ago)25351MITPHPPHP &gt;=7.0.0

Since Dec 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sjaakp/yii2-wysiwyg)[ Packagist](https://packagist.org/packages/sjaakp/yii2-wysiwyg)[ RSS](/packages/sjaakp-yii2-wysiwyg/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Yii2-wysiwyg
------------

[](#yii2-wysiwyg)

#### Redactor editor for Yii 2.x

[](#redactor-editor-for-yii-2x)

[![Latest Stable Version](https://camo.githubusercontent.com/4dcbbd706b65ce1b764c2345f9fda0375616bdc3a8ed3cf99e86bfe616fef29e/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d777973697779672f762f737461626c65)](https://packagist.org/packages/sjaakp/yii2-wysiwyg)[![Total Downloads](https://camo.githubusercontent.com/bdfff5e4d2f39d7bb55f7eea0447a501130ebaa66b0ba2c647723917d1bc3b8a/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d777973697779672f646f776e6c6f616473)](https://packagist.org/packages/sjaakp/yii2-wysiwyg)[![License](https://camo.githubusercontent.com/f687839c91824b2aab058bceb24459eca9370a34a9594dcdcadaf30519fa5334/68747470733a2f2f706f7365722e707567782e6f72672f736a61616b702f796969322d777973697779672f6c6963656e7365)](https://packagist.org/packages/sjaakp/yii2-wysiwyg)

This is a wrapper for the excellent [Imperavi Redactor](http://imperavi.com/redactor/)'What-you-see-is-what-you-get' editor for the [Yii 2.0](https://yiiframework.com/ "Yii") PHP Framework. It automatically loads any [Redactor plugin](https://imperavi.com/redactor/plugins/) needed.

A demonstration of **yii2-wysiwyg** is [here](https://sjaakpriester.nl/software/wysiwyg).

Installation
------------

[](#installation)

The preferred way to install **yii2-wysiwyg** is through [Composer](https://getcomposer.org/). Either add the following to the require section of your `composer.json` file:

`"sjaakp/yii2-wysiwyg": "*"`

Or run:

`composer require sjaakp/yii2-wysiwyg "*"`

You can manually install **yii2-wysiwyg** by [downloading the source in ZIP-format](https://github.com/sjaakp/yii2-wysiwyg/archive/master.zip).

### Redactor files

[](#redactor-files)

[Redactor](http://imperavi.com/redactor/) is proprietry software and is not available via Composer. You have to download it manually.

**Yii2-wysiwyg** assumes that the Redactor files (that is, the complete contents of the `'redactor'` directory in the ZIP-file you get from Imperavi) live in `'@app/redactor'`. You can set another source path by setting parameter `'redactor'`in the application configuration file, usually called `web.php` or `main.php`in the `config` directory, like so:

```
$params = [
    'adminEmail' => ...,
    'redactor' =>
];

$config = [
    // ...
    'params' => $params,
    // ...
]

```

The path can and will most likely be set as an alias.

Using Wysiwyg
-------------

[](#using-wysiwyg)

**Wysiwyg** is just an ordinary Yii 2 [InputWidget](https://yiiframework.com/doc/api/2.0/yii-widgets-inputwidget). In a form, it can be used like this:

```

    ... other fields ...

    ... more fields ...

```

Like any InputWidget, **Wysiwyg** can also be used outside a form. In that case, it should be associated with a `name` and a `value`:

```

```

Options
-------

[](#options)

**Wysiwyg** has al the properties of an [InputWidget](https://yiiframework.com/doc/api/2.0/yii-widgets-inputwidget#$attribute-detail), plus the following:

- **redactorOptions** `array` the options for the Imperavi Redactor.Refer to the [Imperavi Web page](http://imperavi.com/redactor/docs/) for possible options. There are lots of them!
- **includeCss** `bool` whether CSS files should be registered. Set this to false in case you include the CSS in the sites main file.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~0 days

Total

3

Last Release

2328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/156f636aceedc73021a2bfafb5433271c2c55d6cf4bce06b12902c85b4b491f1?d=identicon)[sjaakp](/maintainers/sjaakp)

---

Top Contributors

[![sjaakp](https://avatars.githubusercontent.com/u/5585878?v=4)](https://github.com/sjaakp "sjaakp (5 commits)")[![Buliwyfa](https://avatars.githubusercontent.com/u/13509685?v=4)](https://github.com/Buliwyfa "Buliwyfa (1 commits)")

---

Tags

yii2extensionwidgetyiieditorwysiwyg

### Embed Badge

![Health badge](/badges/sjaakp-yii2-wysiwyg/health.svg)

```
[![Health](https://phpackages.com/badges/sjaakp-yii2-wysiwyg/health.svg)](https://phpackages.com/packages/sjaakp-yii2-wysiwyg)
```

###  Alternatives

[vova07/yii2-imperavi-widget

The imperavi redactor widget for Yii 2 framework.

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

ContentTools editor implementation for Yii 2.

8016.7k](/packages/bizley-contenttools)[jodit/yii2-jodit

Jodit - awesome WYSIWYG Editor like widget for Yii2

1621.5k](/packages/jodit-yii2-jodit)[marqu3s/yii2-summernote

Yii2 Summernote widget. Super simple WYSIWYG editor on Bootstrap

1691.6k8](/packages/marqu3s-yii2-summernote)[zxbodya/yii2-tinymce

Yii2 extension to use TinyMce with Compressor and FileManager

1732.1k3](/packages/zxbodya-yii2-tinymce)

PHPackages © 2026

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