PHPackages                             dmbozhok/yii2-editorjs - 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. dmbozhok/yii2-editorjs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dmbozhok/yii2-editorjs
======================

Use editor.js in form. Module for Yii2

1.1.3(4y ago)00MITPHPPHP &gt;=7.0

Since Sep 2Pushed 4y agoCompare

[ Source](https://github.com/dmbozhok/yii2-editorjs)[ Packagist](https://packagist.org/packages/dmbozhok/yii2-editorjs)[ RSS](/packages/dmbozhok-yii2-editorjs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

editorjs - module for Yii 2
===========================

[](#editorjs---module-for-yii-2)

Use the  in forms from Yii2.

Install
-------

[](#install)

Install via Composer:

```
composer require quanzo/yii2-editorjs
```

or add

```
"quanzo/yii2-editorjs" : "*"
```

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

Config
------

[](#config)

```
$config = [
...
    'modules' => [
...
        'editorjs' => [
            'class' => 'x51\yii2\modules\editorjs\Module',
            /*'uploadDir' => 'upload', // the name of the directory in the root of the site to save information
            'useDateDir' => true; // Pictures will be uploaded to folders with the current date
            'useUserIdDir' => true; // pictures will be arranged in folders with user id
            'maxImageWidth' => 1000; // image size limit
            'uploadImageFromUrl' => true; // permission to download images by url (see download controller)
            'classRender' => '\\x51\\yii2\\modules\\editorjs\\classes\\Render'; // class for converting json (editorjs) to html
            'useCDN' => false; // use javascript download via cdn.jsdelivr.net
            // static page crete from editorjs
            'staticPageDir' => '@app/pages/'; // path to the folder with static editorjs pages
            'extWithDot' => '.json';
            'shortcode' => ''; // name of the shortcode processing module (if processing is needed)
            // if need use access filter
            'as access' => [
                'class' => '\yii\filters\AccessControl',
                'rules' => [
                    [
                        'controllers' => ['editorjs/static', 'editorjs/upload'],
                        'roles' => ['admin'],
                        'allow' => true
                    ],
                    [
                        'roles' => ['?'],
                        'allow' => true
                    ]
                ]
            ]*/
        ],
...
    ],
...
];
```

Using
-----

[](#using)

### Show static page

[](#show-static-page)

Use `\x51\yii2\modules\editorjs\actions\StaticPageAction` in Controller for show static page.

```
    public function actions()
    {
        return [
            'spage' => [
                'class' => '\x51\yii2\modules\editorjs\actions\StaticPageAction',
                'editorjsModuleName' => 'editorjs',
                'on '.\x51\yii2\modules\editorjs\actions\StaticPageAction::EVENT_BEFORE_RUN => function ($event) {
                    Yii::$app->view->registerAssetBundle('\x51\yii2\modules\editorjs\assets\RenderAssets');
                }

            ],
        ];
    }
```

Editor.js in form
-----------------

[](#editorjs-in-form)

```
$form = ActiveForm::begin();
echo $form->field($model, 'post_type')->textInput(['maxlength' => true]);
.....
Yii::$app->getModule('editorjs')->editorjs('editorjs-container', $model->formName(), 'textNameFieldInModel', $model->textNameFieldInModel);
.....
ActiveForm::end();

```

Can be used for any form. The result is in a hidden field. Field name `formName[textNameFieldInModel]`. If you do not specify a form name, then the result in field `textNameFieldInModel`.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.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 ~413 days

Total

3

Last Release

1619d ago

### Community

Maintainers

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

---

Top Contributors

[![dmbozhok](https://avatars.githubusercontent.com/u/46391926?v=4)](https://github.com/dmbozhok "dmbozhok (8 commits)")[![quanzo](https://avatars.githubusercontent.com/u/10706162?v=4)](https://github.com/quanzo "quanzo (7 commits)")

---

Tags

yii2editorjsyii2 module

### Embed Badge

![Health badge](/badges/dmbozhok-yii2-editorjs/health.svg)

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

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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