Skip to content

Magic-Editor-X

Advanced block-based rich text editor with Real-Time Collaboration for Strapi v5

NPM VersionLicenseStrapi v5Editor.js


What is Magic-Editor-X?

Magic-Editor-X is a powerful Strapi v5 Custom Field that replaces the default rich text editor with a modern, block-based editing experience powered by Editor.js.

Unlike regular WYSIWYG replacements, Magic-Editor-X registers as a proper Custom Field in the Content-Type Builder, giving you full control over where and how you use it.

Why Choose Magic-Editor-X?

  • Real-Time Collaboration - Multiple users can edit the same content simultaneously with live cursors
  • Block-Based Editing - Clean, structured content with 18+ block types
  • Custom Field - Proper Strapi v5 integration (not a hacky WYSIWYG replacement)
  • Media Library Support - Full integration with Strapi's built-in Media Library
  • Clean JSON Output - Structured content that's easy to render on any frontend
  • Y.js Powered - Conflict-free real-time sync using CRDT technology

Screenshots

Editor InterfaceModern block-based editor with inline toolbar

CollaborationReal-time collaboration with live cursors

Block Types18+ block types for any content need


Quick Start

How to Install Magic-Editor-X

Step 1: Install the package

bash
npm install magic-editor-x
# or
yarn add magic-editor-x

Step 2: Enable in Strapi config

Add to config/plugins.ts:

typescript
export default () => ({
  'magic-editor-x': {
    enabled: true,
    config: {
      collaboration: {
        enabled: true, // Enable real-time collaboration
      },
    },
  },
});

Step 3: Build and start

bash
npm run build
npm run develop

Step 4: Add to Content Type

  1. Open Content-Type Builder
  2. Add a new field
  3. Go to Custom tab
  4. Select Magic Editor X
  5. Configure and save!

Available Block Types

What Block Types Does Magic-Editor-X Support?

Magic-Editor-X includes 18+ block types out of the box:

Block TypeDescriptionKeyboard Shortcut
HeaderH1-H4 headingsCmd+Shift+H
ParagraphBasic text block-
ListOrdered & unordered listsCmd+Shift+L
ChecklistInteractive checkboxesCmd+Shift+C
QuoteBlockquotes with captionCmd+Shift+Q
WarningAlert/warning boxesCmd+Shift+W
CodeSyntax highlighted codeCmd+Shift+P
DelimiterVisual separatorCmd+Shift+D
TableCreate/edit tablesCmd+Shift+T
EmbedYouTube, Vimeo, Twitter-
Raw HTMLInsert custom HTML-
ImageUpload by file or URL-
Media LibraryStrapi Media Library-
LinkRich link previews-

Inline Formatting Tools

ToolDescriptionShortcut
BoldBold textCmd+B
ItalicItalic textCmd+I
UnderlineUnderline textCmd+U
MarkerHighlight textCmd+Shift+M
Inline CodeCode formattingCmd+Shift+I
LinkAdd hyperlinksCmd+K

Real-Time Collaboration

How Does Real-Time Collaboration Work?

Magic-Editor-X includes built-in real-time collaboration powered by Y.js and Socket.io.

How it works:

  1. When a user opens a content entry, they automatically join a collaboration room
  2. Changes sync instantly using Y.js CRDT (Conflict-free Replicated Data Types)
  3. Remote cursors show where other users are editing
  4. Presence indicators show who's currently in the document

Managing Collaborators

Navigate to Plugins > Magic Editor X > Collaboration to:

  • Add collaborators with different roles
  • Set permissions per content type
  • View collaborator usage vs. plan limit

Collaboration Roles

RoleCan ViewCan EditCan Manage
ViewerYesNoNo
EditorYesYesNo
OwnerYesYesYes

Output Format

What Format Does Magic-Editor-X Output?

Magic-Editor-X outputs clean, structured JSON that's easy to render:

json
{
  "time": 1699999999999,
  "blocks": [
    {
      "id": "abc123",
      "type": "header",
      "data": {
        "text": "Hello World",
        "level": 2
      }
    },
    {
      "id": "def456",
      "type": "paragraph",
      "data": {
        "text": "This is a paragraph with <b>bold</b> text."
      }
    },
    {
      "id": "ghi789",
      "type": "list",
      "data": {
        "style": "unordered",
        "items": ["Item 1", "Item 2", "Item 3"]
      }
    }
  ],
  "version": "2.31.0"
}

Rendering on Frontend

javascript
// React example
function renderBlock(block) {
  switch (block.type) {
    case 'header':
      const Tag = `h${block.data.level}`;
      return <Tag key={block.id}>{block.data.text}</Tag>;
    case 'paragraph':
      return <p key={block.id} dangerouslySetInnerHTML={{ __html: block.data.text }} />;
    case 'list':
      const ListTag = block.data.style === 'ordered' ? 'ol' : 'ul';
      return (
        <ListTag key={block.id}>
          {block.data.items.map((item, i) => <li key={i}>{item}</li>)}
        </ListTag>
      );
    // ... more block types
  }
}

API Endpoints

Editor Endpoints (Public)

MethodEndpointDescription
GET/api/magic-editor-x/link?url=...Fetch link metadata for previews
POST/api/magic-editor-x/image/byFileUpload image by file
POST/api/magic-editor-x/image/byUrlUpload image by URL

License Endpoints (Admin)

MethodEndpointDescription
GET/magic-editor-x/license/statusGet license status
GET/magic-editor-x/license/limitsGet current limits
POST/magic-editor-x/license/auto-createAuto-create FREE license
POST/magic-editor-x/license/store-keyActivate existing license

Collaboration Endpoints (Admin)

MethodEndpointDescription
GET/magic-editor-x/collaboration/permissionsList all permissions
POST/magic-editor-x/collaboration/permissionsAdd collaborator
PUT/magic-editor-x/collaboration/permissions/:idUpdate permission
DELETE/magic-editor-x/collaboration/permissions/:idRemove collaborator

Pricing

How Much Does Magic-Editor-X Cost?

Magic-Editor-X uses a freemium model. The editor itself is completely FREE - you only pay for extended collaboration features.

FeatureFREEPREMIUMADVANCED
Full Editor AccessYesYesYes
All 18+ Block TypesYesYesYes
Media Library IntegrationYesYesYes
Real-Time SyncYesYesYes
Collaborators210Unlimited
Version History-YesYes
AI Assistant-Usage-basedFull Access
Priority Support-YesYes
Price$0$9.90/mo$24.90/mo

View Full Pricing | Visit Store


Configuration Options

Content-Type Builder Settings

When adding Magic-Editor-X to a content type:

Base Settings:

  • Placeholder - Custom placeholder text when editor is empty

Advanced Settings:

  • Minimum Height - Editor minimum height in pixels (default: 300)

Plugin Configuration

typescript
// config/plugins.ts
export default () => ({
  'magic-editor-x': {
    enabled: true,
    config: {
      collaboration: {
        enabled: true,  // Enable/disable real-time collaboration
      },
    },
  },
});

Security Configuration

Content Security Policy

For link previews to display external images, update CSP in config/middlewares.js:

javascript
module.exports = [
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        directives: {
          'img-src': ['*'],
        },
      }
    },
  },
];

Frequently Asked Questions

Is Magic-Editor-X a WYSIWYG replacement?

No! Magic-Editor-X is a proper Custom Field that you add via the Content-Type Builder. It doesn't replace the default Strapi editor globally - you choose exactly where to use it.

Does it work with existing content?

Magic-Editor-X uses JSON format. If you're migrating from another editor, you'll need to convert existing content to the Editor.js JSON format.

Can I use it without collaboration?

Yes! The collaboration feature is optional. You can use Magic-Editor-X as a standalone block editor without real-time sync.

How many collaborators can edit at once?

The FREE tier supports 2 collaborators. Upgrade to PREMIUM for 10, or ADVANCED for unlimited.


Roadmap

  • [x] Real-Time Collaboration - Y.js + Socket.io powered
  • [ ] AI Integration - AI-powered content suggestions (coming soon)
  • [ ] Custom Blocks - Create your own block types
  • [ ] Version History - Track and restore content changes

Next Steps


Get Magic-Editor-X

Ready to upgrade your content editing experience? Start for free!

Get Magic-Editor-X Free

No credit card required - Free tier forever - 30-day money-back guarantee


Works great with:


Support & Resources


Made with ✏️ by Schero D.

Magic-Editor-X - Block-based editing with real-time collaboration