Repository navigation
Description
Description
Today, when content is created or updated through the workflow fire endpoints (/api/v1/workflow/actions/**/fire, firemultipart, bulk fire), a Story Block (Block Editor) field value is stored in the database exactly as sent. If a client sends Markdown instead of a Tiptap/ProseMirror JSON document, dotCMS persists that raw string. The conversion to the proper ProseMirror object only happens later, client-side, when a human opens the contentlet in the editor and re-saves it.
This is a problem for non-interactive/automated content creation (AI agents via the MCP server, headless imports, migrations): the content looks broken to any consumer that reads the field as ProseMirror JSON (GraphQL, REST, SDK renderers) until a person manually opens and re-saves each contentlet.
What we want
On the workflow fire path, when a Story Block field's incoming value is Markdown (not already a valid Tiptap JSON document), the backend should convert it to a Tiptap/ProseMirror JSON object server-side and store that, so no human editor round-trip is required.
Why this is now feasible
PR #35728 (issue #35727) adds com.dotcms.tiptap.TiptapMarkdown, a bidirectional Tiptap-JSON ⇄ Markdown converter at the Java level — including the Markdown → Tiptap JSON direction (via commonmark-java). This provides the conversion primitive needed to do the transform during content save. This issue is about wiring that converter into the fire/save path.
Related work
- Building block / converter: PR feat(tiptap): convert Story Block content to Markdown (#35727) #35728 —
feat(tiptap): convert Story Block content to Markdown - Converter task: Issue Convert Tiptap Story Block content to Markdown #35727 — Convert Tiptap Story Block content to Markdown
- Issue to handle HTML conversion Workflow fire: convert Block Editor HTML to ProseMirror JSON on save (server-side) #36470
Depends on #35728 being merged (or its
TiptapMarkdownconverter being available).
Acceptance Criteria
- On the workflow fire endpoints, a Story Block field value supplied as Markdown is converted to a valid Tiptap/ProseMirror JSON document and stored as such.
- A value that is already valid Tiptap/ProseMirror JSON is detected and stored unchanged (no double-conversion).
- After firing with Markdown, the field reads back as structured ProseMirror JSON via GraphQL/REST/SDK without any human opening and re-saving the contentlet.
- Conversion never throws on unknown/extended nodes or marks (consistent with the graceful-degradation behavior in feat(tiptap): convert Story Block content to Markdown (#35727) #35728).
- Covered by tests (Markdown→stored-JSON through the fire endpoint).
Priority
Medium
Additional Context
Once this lands, the MCP server's existing guidance (telling agents to send Markdown for Block Editor fields) becomes fully correct with no human follow-up step. The fire endpoints already document that Block Editor fields accept Markdown.
Issue for HTML path (#36470)
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(story-block): add isTiptapDoc and isMarkdownRepresentable discri…
feat(story-block): convert Markdown to ProseMirror JSON on the conten…
docs(workflow): correct Block Editor fire note for server-side Markdo…
github-actions commentedon Jun 22, 2026
PRs linked to this issue
test(story-block): assert normalized ProseMirror body, not raw string
test(story-block): assert normalized body in BringBack/Versionable co…
refactor(story-block): tighten TiptapMarkdown save-path discriminators
feat(story-block): convert HTML to ProseMirror JSON on the save path
feat(story-block): convert HTML to ProseMirror JSON on the save path
[-]Workflow fire: convert Block Editor HTML/Markdown to ProseMirror JSON on save (server-side)[/-][+]Workflow fire: convert Block Editor Markdown to ProseMirror JSON on save (server-side)[/+]hmoreras commentedon Jul 10, 2026
✅ QA — passed on modernization build (2026-07-10)
Verified against the current AC (Markdown scope; HTML path tracked at #36470). Local
dotCMS at
localhost:8081, imagedotcms/dotcms:modernization(built 2026-07-08).Method
Two-step per AC: (a) fire a
BlockContentwith a body value in the shape the ACtargets via
PUT /api/v1/workflow/actions/default/fire/PUBLISH, then (b) readbody_rawand query via GraphQLbody { json }to confirm downstream consumerssee structured JSON.
Repro (bash + jq + curl) — click to expand
36002 workflow fire convert block editor markdown to prosemirror json…
convert Block Editor HTML to ProseMirror JSON on save (server-side) (d…