PHPackages                             boring-dragon/editorjs-simple-html-parser - 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. boring-dragon/editorjs-simple-html-parser

ActiveLibrary

boring-dragon/editorjs-simple-html-parser
=========================================

A simple Json to Html parser for EditorJS library

v1.1.6(2y ago)12.0k3MITPHPPHP &gt;=7.3

Since Apr 12Pushed 2y agoCompare

[ Source](https://github.com/boring-dragon/editorjs-simple-html-parser)[ Packagist](https://packagist.org/packages/boring-dragon/editorjs-simple-html-parser)[ RSS](/packages/boring-dragon-editorjs-simple-html-parser/feed)WikiDiscussions master Synced 6d ago

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

[![codecov](https://camo.githubusercontent.com/6bf5518c3ef94b272a0c8dd7ca3d0cb377c4b92e4db0a70d3d29fcd04b8f00a3/68747470733a2f2f636f6465636f762e696f2f67682f4475726c65636f64652f656469746f726a732d73696d706c652d68746d6c2d7061727365722f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d4f4b4735344558394333)](https://codecov.io/gh/Durlecode/editorjs-simple-html-parser)[![License: GPL v3](https://camo.githubusercontent.com/48bf9b56d44f38db53ce21294cf0b9487d0a3734ab3ba1fe4c69858ae20db2c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76332d626c75652e737667)](https://www.gnu.org/licenses/gpl-3.0)

Simple PHP Parser for Editor.js
===============================

[](#simple-php-parser-for-editorjs)

Parse to HTML clean JSON Data from [Editor.js](https://editorjs.io/ "Editor.js Homepage")

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

[](#installation)

```
composer require boring-dragon/editorjs-simple-html-parser

```

Usage
-----

[](#usage)

```
use Durlecode\EJSParser\Parser;

$html = Parser::parse($data)->toHtml();
```

Where `$data` is the clean JSON data coming from Editor.js *See `$data` example below*

```
{
    "time" : 1583848289745,
    "blocks" : [
        {
            "type" : "header",
            "data" : {
                "text" : "Hello World",
                "level" : 2
            }
        }
    ],
    "version" : "2.16.1"
}
```

By default this will generate html with css classes with `prs` prefix, so if you want to change it, follow example below

```
use Durlecode\EJSParser\Parser;

$parser = new Parser($data);

$parser->setPrefix("cat");

$parsed = $parser->toHtml();
```

Supported Tools
---------------

[](#supported-tools)

PackageKeyMain CSS Class`@editorjs/code``code``.prs-code``@editorjs/embed``embed``.prs-embed``@editorjs/delimiter``delimiter``.prs-delimiter``@editorjs/header``header``.prs-h{header-level}``@editorjs/inline-code``@editorjs/link``link``.prs-link``@editorjs/list``list``.prs-list``@editorjs/marker``@editorjs/paragraph``paragraph``.prs-paragraph``@editorjs/raw``raw``@editorjs/simple-image``simpleImage``.prs-image``@editorjs/warning``warning``.prs-warning``@editorjs/quote``quote``.prs-quote`Methods
-------

[](#methods)

#### `toHtml()`

[](#tohtml)

Return generated HTML

#### `setPrefix(string $prefix)`

[](#setprefixstring-prefix)

Set CSS classes Prefix

#### `getPrefix()`

[](#getprefix)

Return current prefix

#### `getVersion()`

[](#getversion)

Return Editor.js content version

#### `getTime()`

[](#gettime)

Return Editor.js content timestamp

#### `getBlocks()`

[](#getblocks)

Return Editor.js content blocks

### Generated HTML

[](#generated-html)

##### Code

[](#code)

```

```

##### Embed

[](#embed)

###### *(Actually working with Youtube, Codepen &amp; Gfycat)*

[](#actually-working-with-youtube-codepen--gfycat)

```

```

##### Delimiter

[](#delimiter)

```

```

##### Header

[](#header)

```
Lorem
```

##### Link

[](#link)

```

        Title
        Description
        https://example.com/

```

##### Ordered List

[](#ordered-list)

```

```

##### Unordered List

[](#unordered-list)

```

```

##### Paragraph

[](#paragraph)

```

    Pellentesque
    malesuada fames
    tempus

```

##### Image

[](#image)

```

```

##### Warning

[](#warning)

```

        Title
        Message

```

##### Raw

[](#raw)

```

    Raw HTML ...

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~157 days

Recently: every ~275 days

Total

8

Last Release

759d ago

### Community

Maintainers

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

---

Top Contributors

[![meCodeBot](https://avatars.githubusercontent.com/u/36118013?v=4)](https://github.com/meCodeBot "meCodeBot (11 commits)")[![smosmochatton](https://avatars.githubusercontent.com/u/22613134?v=4)](https://github.com/smosmochatton "smosmochatton (6 commits)")[![Durlecode](https://avatars.githubusercontent.com/u/34769127?v=4)](https://github.com/Durlecode "Durlecode (3 commits)")[![boring-dragon](https://avatars.githubusercontent.com/u/28459081?v=4)](https://github.com/boring-dragon "boring-dragon (1 commits)")[![hailam](https://avatars.githubusercontent.com/u/1132869?v=4)](https://github.com/hailam "hailam (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/boring-dragon-editorjs-simple-html-parser/health.svg)

```
[![Health](https://phpackages.com/badges/boring-dragon-editorjs-simple-html-parser/health.svg)](https://phpackages.com/packages/boring-dragon-editorjs-simple-html-parser)
```

###  Alternatives

[dompdf/dompdf

DOMPDF is a CSS 2.1 compliant HTML to PDF converter

11.1k169.8M608](/packages/dompdf-dompdf)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[querypath/querypath

HTML/XML querying and processing (like jQuery)

8197.0M27](/packages/querypath-querypath)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3802.9M10](/packages/lullabot-amp)

PHPackages © 2026

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