PHPackages                             neiderruiz/translate-editor-js - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. neiderruiz/translate-editor-js

ActiveLibrary[Localization &amp; i18n](/categories/localization)

neiderruiz/translate-editor-js
==============================

translate text blocks of editorjs.io

1.2.x-dev(3y ago)09MITPHP

Since Feb 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/neiderruiz/translate-editor-js-php)[ Packagist](https://packagist.org/packages/neiderruiz/translate-editor-js)[ RSS](/packages/neiderruiz-translate-editor-js/feed)WikiDiscussions main Synced yesterday

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

[![Github](https://camo.githubusercontent.com/e60b200f091d790d401575559c8af2fca1991ccbe63cbfa761f72158077b22ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4769744875622d3030303f7374796c653d666c6174266c6f676f3d476974687562266c6f676f436f6c6f723d7768697465)](https://www.tiktok.com/@neiderruiz_)[![Github](https://camo.githubusercontent.com/db826a1c698c6b1d38117a78d276dc846ad96f84f19b7e22a6dd20e835602c16/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d54696b546f6b2d3030303f7374796c653d666c6174266c6f676f3d54696b746f6b266c6f676f436f6c6f723d7768697465)](https://www.tiktok.com/@neiderruiz_)[![Linkedin](https://camo.githubusercontent.com/0bdd8730ebbb82c28bfa9ace54ec5c98ee66f7462bee37f0cfc027f94998e30f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d496e7374616772616d2d2532334534343035463f7374796c653d666c6174266c6f676f3d496e7374616772616d266c6f676f436f6c6f723d7768697465)](https://www.instagram.com/neiderruiz_/)[![Gmail](https://camo.githubusercontent.com/a797fc991384f5a5a685f83ca3171e2d434323ba08a00f0cdd4c9270323fed83/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d596f75547562652d4646303030303f7374796c653d666c6174266c6f676f3d596f7554756265266c6f676f436f6c6f723d7768697465)](https://www.youtube.com/@neiderruiz)[![Gmail](https://camo.githubusercontent.com/9b043d232173b76762b07cd7e6bb92c3afee1570a47559ca90a68d7aebc137b2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d46616365426f6f6b2d3362353939383f7374796c653d666c6174266c6f676f3d46616365426f6f6b266c6f676f436f6c6f723d7768697465)](https://www.youtube.com/@neiderruiz)

!important i use this library the editorjs in my frontend project
=================================================================

[](#important-i-use-this-library-the-editorjs-in-my-frontend-project)

- [editorjs](https://editorjs.io/) is a block-styled editor for building beautiful content. It is a simple and easy to use library that allows you to create a custom editor for your project. It is a simple and easy to use library that allows you to create a custom editor for your project.

How use
=======

[](#how-use)

- tha's simple

install
-------

[](#install)

```
composer require neiderruiz/translate-editor-js
```

use
---

[](#use)

```
// import class
use Neiderruiz\TranslateEditorJs\TranslateBlocks;

// create instance

$yourBlock = 'your json';
$inputLang = 'es';
$outputLang = 'en';
$translate = new TranslateBlocks(json_decode($yourBlock),$inputLang, $outputLang);
// yout block is json
$result = $translate->translateBlocks();

// $result is json when you can use in editorjs
```

use trait
---------

[](#use-trait)

```
use Neiderruiz\TranslateEditorJs\Traits\TranslateBlocks;

class YourClass
{
    use TranslateBlocks;
    // your code

    public function yourMethod()
    {
        $yourBlock = 'your json';
        $inputLang = 'es';
        $outputLang = 'en';
        $result = $this->translateBlocks(json_decode($yourBlock),$inputLang, $outputLang);
        // $result is json when you can use in editorjs
    }
}
```

Example structure entry
-----------------------

[](#example-structure-entry)

```
{
    "time": 1677447641819,
    "blocks": [
        {
            "type": "paragraph",
            "data": {
                "text": "mi parrafo"
            }
        },
        {
            "id": "605c5Lx4q9",
            "type": "header",
            "data": {
                "text": "h2 cabecera",
                "level": 6
            }
        },
        {
            "id": "WtVEQ3ycUz",
            "type": "list",
            "data": {
                "style": "ordered",
                "items": [
                    "primer item",
                    "segundo item",
                    "tercer item"
                ]
            }
        },
        {
            "id": "J5a_cFw4RL",
            "type": "image",
            "data": {
                "file": {
                    "url": "http://localhost:8000/storage/images/article/lg/95614461843.jpg"
                },
                "caption": "imagen de salida laravel",
                "withBorder": false,
                "stretched": false,
                "withBackground": false
            }
        },
        {
            "id": "VmuTfohBzO",
            "type": "warning",
            "data": {
                "title": "mi titulo de alerta",
                "message": "alerta mensaje"
            }
        },
        {
            "id": "RFgpoQLNdU",
            "type": "quote",
            "data": {
                "text": "quote ejemplo",
                "caption": "ejemplo caption",
                "alignment": "left"
            }
        },
        {
            "id": "W8E8c3uiZy",
            "type": "checklist",
            "data": {
                "items": [
                    {
                        "text": "tarea realizada",
                        "checked": false
                    },
                    {
                        "text": "añadir nueva tarea",
                        "checked": false
                    }
                ]
            }
        },
        {
            "id": "maXaenLJKG",
            "type": "delimiter",
            "data": {}
        },
        {
            "id": "c-Fv4R20X7",
            "type": "linkTool",
            "data": {
                "link": "https://www.youtube.com/@neiderruiz",
                "meta": {}
            }
        },
        {
            "id": "SGl1B6Pw7G",
            "type": "table",
            "data": {
                "withHeadings": true,
                "content": [
                    [
                        "primero",
                        "segundo",
                        "tercero"
                    ],
                    [
                        "primer texto",
                        "segundo texto",
                        "tercer texto"
                    ]
                ]
            }
        }
    ],
    "version": "2.24.3"
}
```

example outour translate
------------------------

[](#example-outour-translate)

```
{
    "time": 1677447641819,
    "blocks": [
        {
            "type": "paragraph",
            "data": {
                "text": "my paragraph"
            }
        },
        {
            "id": "605c5Lx4q9",
            "type": "header",
            "data": {
                "text": "h2 header",
                "level": 6
            }
        },
        {
            "id": "WtVEQ3ycUz",
            "type": "list",
            "data": {
                "style": "ordered",
                "items": [
                    "first item",
                    "second item",
                    "third item"
                ]
            }
        },
        {
            "id": "J5a_cFw4RL",
            "type": "image",
            "data": {
                "file": {
                    "url": "http://localhost:8000/storage/images/article/lg/95614461843.jpg"
                },
                "caption": "laravel image output",
                "withBorder": false,
                "stretched": false,
                "withBackground": false
            }
        },
        {
            "id": "VmuTfohBzO",
            "type": "warning",
            "data": {
                "title": "my warning title",
                "message": "warning message"
            }
        },
        {
            "id": "RFgpoQLNdU",
            "type": "quote",
            "data": {
                "text": "quote example",
                "caption": "enter caption",
                "alignment": "left"
            }
        },
        {
            "id": "W8E8c3uiZy",
            "type": "checklist",
            "data": {
                "items": [
                    {
                        "text": "task done",
                        "checked": false
                    },
                    {
                        "text": "add new task",
                        "checked": false
                    }
                ]
            }
        },
        {
            "id": "maXaenLJKG",
            "type": "delimiter",
            "data": {}
        },
        {
            "id": "c-Fv4R20X7",
            "type": "linkTool",
            "data": {
                "link": "https://www.youtube.com/@neiderruiz",
                "meta": {}
            }
        },
        {
            "id": "SGl1B6Pw7G",
            "type": "table",
            "data": {
                "withHeadings": true,
                "content": [
                    [
                        "first",
                        "second",
                        "third"
                    ],
                    [
                        "text first",
                        "second text",
                        "third text"
                    ]
                ]
            }
        }
    ],
    "version": "2.24.3"
}
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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.

###  Release Activity

Cadence

Every ~5 days

Total

2

Last Release

1219d ago

### Community

Maintainers

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

---

Top Contributors

[![neiderruiz](https://avatars.githubusercontent.com/u/57574910?v=4)](https://github.com/neiderruiz "neiderruiz (5 commits)")

### Embed Badge

![Health badge](/badges/neiderruiz-translate-editor-js/health.svg)

```
[![Health](https://phpackages.com/badges/neiderruiz-translate-editor-js/health.svg)](https://phpackages.com/packages/neiderruiz-translate-editor-js)
```

PHPackages © 2026

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