DHTMLX RichText MCP server: formats, toolbar, and triggers
DHTMLX RichText is a lightweight WYSIWYG editor with a wide configuration surface. You can convert content between HTML, plain text, and Markdown, set typography per block type through style defaults, and build a fully customizable toolbar that adapts to whatever controls an application needs. Getting full value from that requires matching each piece to its current setup: current CSS for style defaults, the right encoder for a given format, and valid control types for custom toolbar buttons, not a memorized guess.
The DHTMLX MCP server keeps an AI assistant current on all of it. The mentions and trigger setup, the image upload contract, and the DOCX/PDF export flow all come back from current documentation, so generated code matches the editor as it actually behaves today.
MCP endpoint
https://docs.dhtmlx.com/mcp
The DHTMLX MCP server covers all major DHTMLX products, not only DHTMLX RichText. The same endpoint and configuration instructions work regardless of which DHTMLX component you are building with.
RichText coverage in the MCP server
From toolbar buttons to trigger callbacks, the MCP server's index covers the whole DHTMLX RichText surface. Common lookups:
- Looking up the current API for methods, events, and properties, including the Event Bus and state methods.
- Generating ready-to-run initialization code with the container,
toolbar, andmenubara specific editor needs. - Switching between the classic and document layout modes with
layoutMode, and building a custom toolbar from built-in buttons orbutton/richselect/colorpickercontrol objects. - Reading or writing content as HTML, plain text, or Markdown through
setValue(),getValue(), andinsertValue()with the matching encoder. - Setting default styles per block type alongside the matching CSS rules.
- Wiring an image upload endpoint to the exact request and response contract RichText expects, or relying on the inline base64 fallback.
- Configuring @mentions, #tags, and slash commands through the
triggersproperty, including static, sync, and async data sources. - Handling
exportandimportfor DOCX/PDF output, and localizing the interface or styling it with--wx-color-primaryand other CSS variables. - Integrating RichText with React, Vue, Angular, and Svelte.
How the MCP server handles a RichText prompt
A RichText request to the DHTMLX MCP server travels through a Retrieval-Augmented Generation (RAG) pipeline over the Model Context Protocol (MCP) before landing in one of two workflows: Search, which hands back matching reference pages, or Inference, which reads those pages and answers directly. A RichText request often has two sides for the assistant: one that needs current documentation, and one it already knows how to handle without help. It splits off the first before anything reaches MCP.
Trace the prompt "How do I set up DHTMLX RichText so that images get uploaded to my company's asset server before they're inserted into the document?" through it:
- The assistant pulls out the documentation side of the request: the request and response contract RichText expects from an image upload endpoint.
- The server ties it to the working-with-server documentation.
- The request needs working code, so Search handles it (a narrower question, like whether
insertValue()replaces a selection or inserts at the cursor, would go to Inference instead). - Search retrieves the matching pages from a vector index built on the current RichText documentation.
- Those pages come back to the assistant as context.
- The assistant wires up the upload handler to match that contract, then fills in the actual request to the company's asset server from its own knowledge.
RichText's formatting and toolbar suggestions stay aligned with how the editor behaves today because of that path.
Attaching your AI tool to the MCP server
Registering the MCP endpoint only needs doing once per tool, whether that means a CLI command or a JSON config entry, and every one of them is aimed at the same address:
https://docs.dhtmlx.com/mcp
Setup steps for popular tools are covered one by one below.
Claude Code
Every MCP setup detail for Claude Code sits in its official documentation.
To register the server from the command line, run:
claude mcp add --transport http dhtmlx-mcp https://docs.dhtmlx.com/mcp
Rather wire it up yourself? Drop this into your .mcp.json:
{
"mcpServers": {
"dhtmlx-mcp": {
"type": "http",
"url": "https://docs.dhtmlx.com/mcp"
}
}
}
Cursor
Cursor's official documentation has the complete MCP configuration walkthrough.
Steps to add the server:
- Open Settings (
Cmd+Shift+Jon Mac,Ctrl+Shift+Jon Windows/Linux) - Go to Tools & MCP
- Click Add Custom MCP
- Paste the following config:
{
"mcpServers": {
"dhtmlx-mcp": {
"url": "https://docs.dhtmlx.com/mcp"
}
}
}
Google Antigravity
Antigravity 2.0
Check the official documentation for the complete MCP integration steps in Antigravity.
These are the steps to complete for connecting DHTMLX MCP server with Google Antigravity:
- Open the command palette
- Type "mcp add"
- Select "HTTP"
- Provide the following values:
- Name:
dhtmlx-mcp
- URL:
https://docs.dhtmlx.com/mcp
Antigravity CLI
The related guide walks through everything that changes when migrating off Gemini CLI to Antigravity CLI.
To connect the DHTMLX MCP server to Antigravity CLI, create mcp_config.json in one of these locations:
- Global:
~/.gemini/config/mcp_config.json - Workspace:
.agents/mcp_config.json
Add the following configuration:
{
"mcpServers": {
"dhtmlx-mcp": {
"serverUrl": "https://docs.dhtmlx.com/mcp"
}
}
}
Then run agy in the terminal.
ChatGPT
Every step of the ChatGPT MCP connector setup is spelled out in the official documentation.
Steps to configure the connector:
- Go to Settings → Apps & Connectors
- Click Advanced settings
- Enable Developer mode
- Return to Apps & Connectors and click "Create"
- Fill in the connector details:
- Name:
dhtmlx-mcp
- URL:
https://docs.dhtmlx.com/mcp
- Authentication:
No authentication
- Click Create
After you create the connector, ChatGPT pulls documentation from the MCP server during conversations.
For intensive coding workflows, other MCP-aware tools may be a better fit.
Other tools
Check any other AI coding tool's settings for a label like "Model Context Protocol" or "Context Sources," then add https://docs.dhtmlx.com/mcp there as a custom source.
MCP server privacy basics
The MCP server runs remotely and only remotely: no local execution, no local file access, no stored personal information.
Logged queries serve one purpose: debugging and improving the service.
DHTMLX offers a commercial deployment with query logging turned off for stricter privacy needs. Get in touch at info@dhtmlx.com.
Prompt ideas for building with RichText
RichText prompts tend to fall into one of four areas: layout, content format, image handling, or mentions and triggers. The groups below are organized that way; pick one and adapt it to your setup.
Layout and toolbar
How do I switch DHTMLX RichText from full-width editing to a document-style layout? Use the docs.
How do I build a custom toolbar with only bold, italic, and one custom button?
How do I make the built-in layout mode switcher show up as a dropdown instead of a plain button?
Content and formats
How do I load Markdown content into DHTMLX RichText?
How do I read DHTMLX RichText's content out as plain text instead of HTML?
How do I insert an HTML link at the current cursor position without replacing the rest of the content?
Images and server sync
How do I make DHTMLX RichText upload images to my own server instead of embedding them inline?
What JSON response does DHTMLX RichText expect from an image upload endpoint?
Mentions, tags, and triggers
How do I set up an @ mention trigger that looks up users from a server? Use the docs.
How do I make a slash command insert just the item text, without the leading slash showing up?
What makes a RichText prompt work
- Name the exact method.
setValue()replaces the whole document,insertValue()inserts at the cursor or replaces a selection, andgetValue()reads content out. State which one you mean instead of "update the content." - Say which format you're working with.
setValue(),getValue(), andinsertValue()default to HTML but acceptrichtext.text.fromTextandrichtext.markdown.fromMarkdownencoders. Name the format so the assistant passes the right encoder instead of assuming HTML. - Distinguish toolbar control types.
richselectandcolorpickeronly work on specific predefined control IDs; custom buttons only supporttype: "button". Say which type you're adding so the assistant doesn't pair a type with an ID that ignores it. - Add "Use the docs" for the image upload response shape or the
defaultStyles/CSS pairing. Both have a specific contract (exact JSON fields, manual CSS rules) that's easy to misremember.