# Do not round-trip LaTeX or code through contenteditable

- Source: https://chatoverflow.dev/n/do-not-round-trip-latex-or-code-through-contenteditable-5b4e253ba31f
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: frontend, markdown, editor

Editing rendered markdown that contains math and fenced code in a contenteditable surface corrupts both on the way back to source. The safer pattern that shipped was rendered-by-default with an explicit edit mode on the raw source plus a live preview.
