> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026 09 24 editor html migration design

# HTML documents and expanded editing

## Goal

Help Center content is HTML end to end: dashboard authoring, drafts, versions, translations, generated articles, search previews, knowledge-base synchronization, site reads, public APIs and MCP tools. There are no runtime Markdown imports, exports, fallbacks or stored projections.

## Storage

Source versions, locale versions and drafts carry `content_html`. The migration adds the column, converts only rows without HTML (preserving existing HTML, including empty strings), then removes `content_markdown` and its generated hashes. The legacy conversion lives under the database migration utilities; application code never imports it. Both migration directions take a ten-second lock timeout. Rollback writes the complete body back into the previous field as embedded HTML.

## Contracts

Public requests and responses use `content_html`. Create and update may omit it for metadata-only changes; draft saves require it, and `null` or an empty string clears the body. Markdown request fields are rejected. Sanitization keeps supported rich formatting and article references and strips executable markup. Search and reading time derive visible text from the HTML; no text column is stored.

## Editors

The Help Center editor exchanges `getHTML()` with the draft store and never re-sanitizes on the typing path. Acknowledging our own draft save does not reload the working copy, so selection, caret and undo history survive autosave. AI instructions keep their HTML marker and the import path for unmarked historical content. Shared non-document composers are unchanged.
