Editor.js Integration into CMS

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Editor.js Integration into CMS

Editor.js is a block editor with clean JSON output. Each paragraph, heading, image—separate block with typed data. This makes content structured and portable between platforms.

Installation

npm install @editorjs/editorjs @editorjs/paragraph @editorjs/header @editorjs/image
npm install @editorjs/list @editorjs/quote @editorjs/code @editorjs/table

Initialization

import EditorJS from '@editorjs/editorjs';
import Header from '@editorjs/header';
import Image from '@editorjs/image';
import List from '@editorjs/list';

const editor = new EditorJS({
    holder: 'editor-container',
    placeholder: 'Start typing content...',
    tools: {
        header: {
            class: Header,
            config: { levels: [2, 3, 4], defaultLevel: 2 }
        },
        image: {
            class: Image,
            config: {
                uploader: {
                    uploadByFile: async (file) => {
                        const formData = new FormData();
                        formData.append('image', file);
                        const response = await fetch('/api/media/upload', {
                            method: 'POST', body: formData
                        });
                        const data = await response.json();
                        return { success: 1, file: { url: data.url } };
                    }
                }
            }
        },
        list: { class: List, inlineToolbar: true },
        quote: { class: Quote, inlineToolbar: true }
    },
    data: initialData  // JSON from database
});

// Save
const savedData = await editor.save();
// savedData.blocks — array of blocks

Data Format

{
    "time": 1710500000000,
    "blocks": [
        { "type": "header",    "data": { "text": "Article heading", "level": 2 } },
        { "type": "paragraph", "data": { "text": "Paragraph text <b>with formatting</b>." } },
        { "type": "image",     "data": { "file": { "url": "/uploads/photo.jpg" }, "caption": "Caption" } },
        { "type": "list",      "data": { "style": "ordered", "items": ["First", "Second"] } }
    ]
}

Server-side Rendering JSON

For SSR or server-side HTML generation from Editor.js JSON:

// PHP: convert Editor.js JSON → HTML
class EditorJsRenderer
{
    public function render(array $data): string
    {
        return collect($data['blocks'])->map(fn($block) =>
            match($block['type']) {
                'header'    => "<h{$block['data']['level']}>{$block['data']['text']}</h{$block['data']['level']}>",
                'paragraph' => "<p>{$block['data']['text']}</p>",
                'image'     => "<figure><img src=\"{$block['data']['file']['url']}\" alt=\"{$block['data']['caption']}\"><figcaption>{$block['data']['caption']}</figcaption></figure>",
                'list'      => $this->renderList($block['data']),
                'quote'     => "<blockquote>{$block['data']['text']}<cite>{$block['data']['caption']}</cite></blockquote>",
                default     => ''
            }
        )->implode("\n");
    }
}

Custom Tool

class CalloutBlock {
    static get toolbox() {
        return { title: 'Callout', icon: '<svg>...</svg>' };
    }

    render() {
        this.wrapper = document.createElement('div');
        this.wrapper.className = 'callout-block';
        this.wrapper.contentEditable = true;
        return this.wrapper;
    }

    save(element) {
        return { text: element.innerHTML };
    }
}

Integration timeline: 1–2 days for basic editor with image upload and server-side rendering.