Skip to content
  1. Extras
  2. mxEditorJs

mxEditorJs

Block content editor for MODX 3 based on Editor.js. Replaces the default TinyMCE/CKEditor: content is created in blocks (heading, text, image, video), and the site renders proper HTML.

NeedDocument
Enable editor in 3 stepsQuick start
Blocks, media, embedEditor guide
Configure tool profiles and mediaSystem settings
Connector API, PHP classes, data formatsAPI
TVs, HTML → Editor.js migrationIntegration
Common editor questionsFAQ
Save flow, sidecar, connectorFlows

Who reads what

Package: 1.1.0-beta2. modstore.pro, GitHub. Changelog in the package repo: core/components/mxeditorjs/docs/changelog.txt.

Features

  • Block editor — 14 block types: paragraph, header, list, checklist, quote, table, code, raw HTML, embed, image, gallery, attachment, delimiter, warning
  • TV support — editor in main resource content and in Template Variables of type textarea with richtext option
  • Media upload — drag-and-drop images and files via MODX Media Sources. Separate paths for images and attachments (Attaches)
  • Gallery — multiple images in one block, sorting, fit and slider modes, upload and Browse via Media Source (same as Image)
  • File browser — browse Media Source directories
  • Link autocomplete — MODX resource search when inserting links
  • HTML → Editor.js migration — convert existing HTML content
  • Tool profiles — presets (default, minimal, blog, full) and custom
  • Fullscreen, Source Preview, Undo/Redo, text alignment
  • Localization — Russian and English, inherits manager locale
  • CSS presets — configurable classes for images and links

Editor.js plugins used

mxEditorJs builds the editor from the following block and inline tools, block tune, and plugin. Full catalog: Awesome Editor.js.

Block tools

PluginDescriptionLinks
@editorjs/paragraphBasic text blocknpm · awesome
@editorjs/headerHeadings H2–H5npm · awesome
@editorjs/listBullet and numbered listsnpm · awesome
@editorjs/checklistChecklist with checkboxesnpm · awesome
@editorjs/quoteQuotenpm · awesome
@editorjs/tableTablenpm · awesome
@editorjs/codeCode blocknpm · awesome
@editorjs/rawRaw HTMLnpm · awesome
@editorjs/embedEmbed (YouTube, Paste, etc.)npm · awesome
@editorjs/attachesFile attachmentsnpm · awesome
@editorjs/delimiterDelimiternpm · awesome
@editorjs/warningWarning blocknpm · awesome
Image (custom)Image with MODX Media Source upload and browserPart of mxEditorJs (ImageTool.ts), similar to @editorjs/image
Gallery (custom)Image gallery on @kiberpro/editorjs-gallery: sorting, fit/slider modesPart of mxEditorJs (GalleryTool.ts)

Inline tools

PluginDescriptionLinks
@editorjs/markerText highlight (marker)npm · awesome
@editorjs/inline-codeMonospace code in textnpm · awesome
@editorjs/underlineUnderlinenpm · awesome

Links and MODX resource autocomplete are implemented by the custom LinkAutocomplete tool in mxEditorJs (inspired by @editorjs/link-autocomplete).

Block tune

PluginDescriptionLinks
editorjs-text-alignment-blocktuneText alignment in blocks (left, center, right)npm · GitHub · awesome

Editor plugins

PluginDescriptionLinks
editorjs-undoUndo/Redonpm · GitHub · awesome

Core

PluginLinks
@editorjs/editorjsEditor.js core

Requirements

DependencyVersion
MODX Revolution3.0.3+
PHP8.2+
Node.js18+ (only for building frontend from source)

Installation

Via package manager

  1. Go to Extras → Installer (in MODX 3: Packages → Installer)
  2. Click Download Extras and refresh the package list
  3. Find mxEditorJs, click Download, then Install
  4. Manage → Clear cache (in MODX 3: Settings → Clear cache)

Or install a transport package manually: download mxeditorjs-*.transport.zip, in Packages → Installer click Upload package, select the file, install, then clear cache.

From source (development)

bash
cd /path/to/modx/Extras/
git clone https://github.com/Ibochkarev/mxEditorJs mxEditorJs
cd mxEditorJs
npm install
npm run build
php _build/build.php

Quick start (3 steps)

  1. System → System settings → find which_editor → select mxEditorJs
  2. Ensure mxeditorjs.enabled = Yes
  3. Open any resource — the block editor appears in the content field

See: Quick start.

System settings (overview)

All settings are in the mxeditorjs namespace.

KeyDefaultPurpose
mxeditorjs.enabledtrueEnable/disable editor
mxeditorjs.profiledefaultActive tool profile
mxeditorjs.enabled_toolsOverride profile: comma-separated tool list
mxeditorjs.image_mediasource1Media Source ID for images and gallery
mxeditorjs.image_upload_pathimages/resources/{resource_id}/Image upload path (Image, Gallery)
mxeditorjs.file_upload_pathfiles/resources/{resource_id}/Attachment upload path (Attaches)
mxeditorjs.gallery_max_count0Max images in Gallery block (0 = no limit)
mxeditorjs.max_upload_size5242880 (5 MB)Max upload size (bytes)

Full list: System settings.