/syncfusion-javascript:syncfusion-javascript-block-editorfrom Syncfusion JavaScript UI Controls
Implement the Syncfusion JavaScript BlockEditor control - a modern block-based text editor with drag-and-drop, slash commands, extensive formatting capabilities, and real-time collaborative editing. Use this skill IMMEDIATELY for: BlockEditor implementation, block-based editors, content editing with blocks, document editors with block structure, text editing with modern UI, slash command menus, drag-and-drop content reordering, inline toolbars, collaborative editing features, real-time multi-user editing, Yjs integration, user presence and remote cursors, document version history, structured content creation, @mentions and labels, code blocks with syntax highlighting, tables and lists, collapsible sections, or any Syncfusion EJ2 BlockEditor control usage in JavaScript applications.
Ships in Syncfusion JavaScript UI Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Syncfusion JavaScript BlockEditor is a modern, block-based text editor that enables users to create, format, and organize content using various block types. It provides an intuitive editing experience with features like drag-and-drop reordering, slash commands, inline toolbars, and extensive customization options. The BlockEditor control is built on a block-based architecture where content is organized into discrete blocks. Each block has a specific type (paragraph, heading, list, image, etc.) and can contain formatted content. Key characteristics:
📄 Read: references/getting-started.md
@syncfusion/ej2-blockeditor)📄 Read: references/blocks-and-content-models.md
📄 Read: references/built-in-block-types.md
📄 Read: references/editor-menus-and-toolbars.md
📄 Read: references/methods-reference.md
📄 Read: references/events-reference.md
📄 Read: references/drag-drop-and-selection.md
📄 Read: references/paste-undo-redo-keyboard.md
📄 Read: references/customization-and-appearance.md
--color-sf-* with --sf naming convention).e-blockeditor, .e-active, .e-selected, .e-list-item, .e-dropdownbase, .e-table-element, #blockeditor_contextmenu, #blockeditor_code-ddl_popup)📄 Read: references/security-and-sanitization.md
📄 Read: references/collaborative-editing.md
collaboration.ts file with Yjs document, adapter, provider, and room allocation logicy-websocket for production deploymentsCollaboration and VersionHistory modulescollaborationSettings property (provider, adapter, enableAwareness, versionHistory)users and currentUserIdsnapshotCreated, snapshotRestoredimport { BlockEditor, BlockType, ContentType } from '@syncfusion/ej2-blockeditor';
// Initialize BlockEditor with sample content
const editor = new BlockEditor({
width: '100%',
height: '600px',
blocks: [
{
id: 'heading-1',
blockType: BlockType.Heading,
properties: { level: 1 },
content: [
{
contentType: ContentType.Text,
content: 'Welcome to BlockEditor'
}
]
},
{
id: 'intro-para',
blockType: BlockType.Paragraph,
content: [
{
contentType: ContentType.Text,
content: 'Start typing or press "/" to open the command menu.'
}
]
},
{
id: 'bullet-list',
blockType: BlockType.BulletList,
content: [
{
contentType: ContentType.Text,
content: 'Drag blocks to reorder'
}
]
}
],
enableDragAndDrop: true,
enableHtmlSanitizer: true
});
// Render the editor
editor.appendTo('#blockeditor');
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.syncfusion.com/ej2/32.1.19/tailwind.css" rel="stylesheet" />
</head>
<body>
<div id="blockeditor"></div>
</body>
</html>
// Add a new paragraph block after a target block
const newBlock = {
id: 'new-para',
blockType: BlockType.Paragraph,
content: [
{
contentType: ContentType.Text,
content: 'This is a new paragraph.'
}
]
};
editor.addBlock(newBlock, 'target-block-id', true); // true = after
// Get all content as HTML
const htmlContent = editor.getDataAsHtml();
// Get all content as JSON
const jsonContent = editor.getDataAsJson();
// Get specific block content
const blockHtml = editor.getDataAsHtml('block-id');
const blockJson = editor.getDataAsJson('block-id');
const editor = new BlockEditor({
blockChanged: (args) => {
console.log('Blocks changed:', args.changes);
// Auto-save functionality
saveContent(editor.getDataAsJson());
}
});
const editor = new BlockEditor({
commandMenuSettings: {
popupWidth: '350px',
commands: [
{
id: 'custom-quote',
type: BlockType.Quote,
label: 'Quote Block',
iconCss: 'e-icons e-quote',
groupBy: 'Basic'
},
{
id: 'timestamp',
label: 'Insert Timestamp',
iconCss: 'e-icons e-schedule',
groupBy: 'Actions'
}
],
itemSelect: (args) => {
if (args.command.id === 'timestamp') {
// Custom action: insert current timestamp
const timestamp = new Date().toLocaleString();
// Insert logic here
}
}
}
});
import { BlockEditor, Collaboration, YjsAdapter } from '@syncfusion/ej2-blockeditor';
import * as Y from 'yjs';
import { WebsocketProvider } from 'y-websocket';
BlockEditor.Inject(Collaboration);
const yDoc = new Y.Doc();
const yFragment = yDoc.getXmlFragment('blockeditor');
const adapter: YjsAdapter = { yRuntime: Y, yXmlFragment: yFragment };
const provider = new WebsocketProvider('wss://your-server-url', 'document-room-id', yDoc);
const editor = new BlockEditor({
users: [{ id: 'user-1', user: 'John Doe', avatarBgColor: '#e74c3c' }],
currentUserId: 'user-1',
collaborationSettings: {
provider: provider,
adapter: adapter,
enableAwareness: true,
}
});
editor.appendTo('#blockeditor');
const editor = new BlockEditor({
imageBlockSettings: {
saveUrl: 'https://your-server.com/api/upload',
path: '/images/',
allowedTypes: ['.jpg', '.jpeg', '.png', '.gif'],
maxFileSize: 5000000, // 5MB
maxWidth: 1200,
maxHeight: 800,
enableResize: true,
saveFormat: 'Blob' // or 'Base64'
},
fileUploadSuccess: (args) => {
console.log('File uploaded:', args.fileUrl);
}
});
Override the --color-sf-* CSS variables on .e-blockeditor (or any ancestor) to re-skin the editor without touching component configuration:
const blockEditor = new BlockEditor({
blocks: blocksData,
width: '100%',
height: '600px'
});
blockEditor.appendTo('#blockeditor');
// Switch theme by toggling a body class
function applyTheme(themeName: 'slateLightTheme' | 'sageGreenTheme' | 'darkProTheme') {
document.body.classList.remove('slateLightTheme', 'sageGreenTheme', 'darkProTheme');
document.body.classList.add(themeName);
}
/* CSS variables follow the unified --sf naming convention */
.darkProTheme .e-blockeditor {
--color-sf-content-bg-color: #0d1117;
--color-sf-content-bg-color-hover: #161b22;
--color-sf-content-bg-color-selected: #21262d;
--color-sf-content-text-color: #e6edf3;
--color-sf-placeholder-text-color: #7d8590;
--color-sf-border: #30363d;
--color-sf-border-hover: #58a6ff;
--color-sf-primary: #1f6feb;
--color-sf-primary-text-color: #ffffff;
--color-sf-icon-color: #8b949e;
background: #0d1117 !important;
border: 1px solid #30363d;
border-radius: 20px;
}
For a fully customized theme across all Syncfusion components, use Syncfusion Theme Studio with Material 3, Fluent 2, Bootstrap 5.3, or Tailwind 3 as the base.
BlockModel[] - Initial content blocksstring | number - Editor width (default: '100%')string | number - Editor height (default: 'auto')boolean - Read-only mode (default: false)boolean - Drag-drop blocks (default: true)boolean - Sanitize HTML (default: true)number - Max undo/redo operations (default: 30)string - Custom CSS class for stylingCommandMenuSettingsModel - Slash command menu (/)BlockActionMenuSettingsModel - Block action menu (⋮)ContextMenuSettingsModel - Right-click context menuInlineToolbarSettingsModel - Text formatting toolbarTransformSettingsModel - Block transformation menuImageBlockSettingsModel - Image upload and configurationCodeBlockSettingsModel - Code syntax highlightingPasteCleanupSettingsModel - Paste formatting controlLabelSettingsModel - Labels/tags configuration ($label)UserModel[] - Users for mentions (@user){ [key: string]: string } - Custom keyboard shortcutsFontColorSettingsModel - Text color paletteBackgroundColorSettingsModel - Background/highlight color palette--color-sf-*): Override on .e-blockeditor (or any ancestor) to customize colors, borders, placeholders, primary accent, and icons without touching component properties.e-blockeditor, .e-active, .e-selected, .e-list-item, .e-dropdownbase, .e-table-element, #blockeditor_contextmenu, #blockeditor_code-ddl_popupCollaborationSettingsModel - Real-time collaboration configuration (provider, adapter, enableAwareness, versionHistory)UserModel[] - Connected users, also used for mentions and presencestring - Identifies the local user for presence and cursor highlightingBlockEditor.Inject(...)string - Localization code (default: 'en-US')boolean - Right-to-left support (default: false)boolean - Persist state across reloads (default: false)references/blocks-and-content-models.md (opens in a new tab)references/built-in-block-types.md (opens in a new tab)references/collaborative-editing.md (opens in a new tab)references/customization-and-appearance.md (opens in a new tab)references/drag-drop-and-selection.md (opens in a new tab)references/editor-menus-and-toolbars.md (opens in a new tab)references/events-reference.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/methods-reference.md (opens in a new tab)references/paste-undo-redo-keyboard.md (opens in a new tab)references/security-and-sanitization.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-javascriptOther plugins' skills for the same job
67 skills in this plugin
/syncfusion-javascript-3d-chartCreate interactive 3D charts in Syncfusion TypeScript and JavaScript. Immediately use this skill when user needs to build 3D visualizations, render 3D column/bar charts, configure 3D rotation and depth, visualize data in three dimensions, customize 3D chart appearance, handle 3D interactions, or implement advanced 3D features. Works with TypeScript (webpack/module-based) and JavaScript (CDN/ES5)./syncfusion-javascript-accordionBuild collapsible navigation panels with the Syncfusion TypeScript Accordion component. Use this skill when implementing vertical accordion menus, expanding/collapsing content panels, multi-step wizards, data-driven panels with dynamic content, tabbed navigation alternatives, or nested hierarchical content structures. Covers initialization, expand modes, animations, icons, templates, styling, data binding, and advanced use cases like form wizards./syncfusion-javascript-accumulation-chartImplements Syncfusion JavaScript accumulation charts (Pie, Doughnut, Funnel, Pyramid) for proportional and percentage-based visualizations. Use when displaying categorical or proportional data. Covers legend and label configuration, interactivity, accessibility, and customization. Works with TypeScript (modules) and JavaScript (CDN/ES5).