Skip to content
  1. Extras
  2. mxEditorJs

mxEditorJs ​

Block editor for MODX 3 on Editor.js. Content is built in blocks instead of TinyMCE/CKEditor. The site outputs 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 ​

modstore.pro, GitHub. Changelog: core/components/mxeditorjs/docs/changelog.txt.

Features ​

  • 15 block types: paragraph, header, list, checklist, quote, table, code, raw HTML, embed, image, gallery, mxGallery, attachment, delimiter, warning. The mxgallery toolbox appears only when the mxGallery package is installed.
  • TVs: main resource content and Template Variables of type textarea with richtext
  • Media: drag-and-drop via MODX Media Sources. Separate paths for images and attachments (Attaches)
  • Gallery: multiple images, sorting, fit or slider, upload and Browse via Media Source
  • File browser: browse Media Source directories
  • Link autocomplete: MODX resource search
  • HTML → Editor.js migration
  • Tool profiles: default, minimal, blog, full, and custom
  • Fullscreen, Source Preview, Undo/Redo, text alignment
  • Localization: Russian and English, inherits manager locale
  • CSS presets: classes for images and links

Editor.js plugins used ​

Tool 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
ImageImage with MODX Media Source upload and browserPart of mxEditorJs (ImageTool.ts), similar to @editorjs/image
GalleryImage gallery on @kiberpro/editorjs-gallery: sorting, fit/slider modesPart of mxEditorJs (GalleryTool.ts)
mxGallerymxGallery package block: media by ids or a collectionPart of mxEditorJs (MxGalleryTool.ts). Toolbox only if core/components/mxgallery/ exists

Inline tools ​

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

Links and MODX resource autocomplete: the 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/editorjs — Editor.js corenpm · GitHub · docs

Requirements ​

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

Installation ​

Via package manager ​

  1. Extras → Installer (MODX 3: Packages → Installer)
  2. Download Extras, refresh the package list
  3. Find mxEditorJs → Download → Install
  4. Manage → Clear cache (MODX 3: Settings → Clear cache)

Or install mxeditorjs-*.transport.zip: Packages → Installer → Upload package → install → 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 → which_editor → mxEditorJs
  2. 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_tools—Override 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.