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

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

zakurdaev/yii2-editorjs-widget
==============================

Use editor.js in form. Module for Yii2

101.5k↓50%5[2 issues](https://github.com/zakurdaev/yii2-editorjs-widget/issues)1PHP

Since May 12Pushed 6y ago2 watchersCompare

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

READMEChangelog (1)DependenciesVersions (1)Used By (1)

Editor.js Widget for Yii 2
==========================

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

`Editor.js Widget` is a wrapper for [Editor.js](https://github.com/codex-team/editor.js), next generation block styled editor.

Install
-------

[](#install)

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

Either run

```
$ php composer.phar require --prefer-dist zakurdaev/yii2-editorjs-widget "*"
```

or add

```
"zakurdaev/yii2-editorjs-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 \zakurdaev\editorjs\EditorJsWidget::widget([
    'selector' => 'redactor'
]);
```

### Like an ActiveForm widget

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

```
use \zakurdaev\editorjs\EditorJsWidget;

echo $form->field($model, 'content_json')->widget(EditorJsWidget::class, [
 'selectorForm' => $form->id
])->label();
```

### Supported block

[](#supported-block)

The plugin is able to support all blocks for Editor.js. You can use the standard Asset or use Asset CDN or write your own.

#### EditorJsAsset

[](#editorjsasset)

Include:

- editorjs/header v2.4.1
- editorjs/paragraph v2.6.1
- editorjs/image v2.3.4
- editorjs/list v1.4.0
- editorjs/table v1.2.2
- editorjs/quote v2.3.0
- editorjs/warning v1.1.1
- editorjs/code v2.4.1
- editorjs/embed v2.3.1
- editorjs/delimiter v1.1.0
- editorjs/inline-code v1.3.1

#### Custom Asset

[](#custom-asset)

```
use \zakurdaev\editorjs\EditorJsWidget;

echo $form->field($model, 'content_json')->widget(EditorJsWidget::class, [
 'selectorForm' => $form->id,
 'assetClass' => 'YOUR/PATH/TO/ASSET'
])->label();
```

### Upload image by file and url

[](#upload-image-by-file-and-url)

Widget supports image loading for [Editor.js Image Block](https://github.com/editor-js/image).

```
// SiteController.php
public function actions()
{
    return [
        'upload-file' => [
            'class' => UploadImageAction::class,
            'mode' => UploadImageAction::MODE_FILE,
            'url' => 'https://example.com/upload_dir/',
            'path' => '@app/web/upload_dir',
            'validatorOptions' => [
                'maxWidth' => 1000,
                'maxHeight' => 1000
            ]
        ],
        'fetch-url' => [
            'class' => UploadImageAction::class,
            'mode' => UploadImageAction::MODE_URL,
            'url' => 'https://example.com/upload_dir/',
            'path' => '@app/web/upload_dir'
        ]
    ];
}

// view.php
echo \zakurdaev\editorjs\EditorJsWidget::widget([
    'selector' => 'redactor',
    'endpoints' => [
        'uploadImageByFile' => Url::to(['/site/upload-file']),
        'uploadImageByUrl' => Url::to(['/site/fetch-url']),
    ],
]);
```

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/78f12131aa9486d3be1a581457aaabad9c1c381fb9f936dda27c8ca2455ff20b?d=identicon)[zakurdaev](/maintainers/zakurdaev)

---

Top Contributors

[![zakurdaev](https://avatars.githubusercontent.com/u/4710771?v=4)](https://github.com/zakurdaev "zakurdaev (2 commits)")

### Embed Badge

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

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

###  Alternatives

[yurunsoft/swoole-co-pool

26388.0k1](/packages/yurunsoft-swoole-co-pool)[barrelstrength/sprout-fields

International, Craft-friendly field types.

1176.5k](/packages/barrelstrength-sprout-fields)

PHPackages © 2026

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