diff --git a/docs/Formatting.md b/docs/Formatting.md
index 90368ba9..3366eeae 100644
--- a/docs/Formatting.md
+++ b/docs/Formatting.md
@@ -96,6 +96,8 @@ Here `foo` is categorized as `mixed content`, since it contains text and tag ele
text bold more
+``` +becomes: +```xml +text bold more
+``` + +Newlines within text nodes are also collapsed: + +```xml +text + bold + more
+``` +becomes: +```xml +text bold more
+``` + +However, line breaks in whitespace-only gaps between sibling elements are preserved (with normalized indentation): + +```xml +text bold more
+``` +becomes: +```xml +text bold more
+``` + +```xml + +text bold more
+``` + +If it overflows `maxLineWidth`, content soft-wraps at the overflow point. Consider this input with `` and `Click here to see the
Click here to see the
Click here to see the +
Click + here + to see the +
text bold more
+``` +always becomes: +```xml ++ text + bold + more +
+``` + +This is useful when you always want expanded mixed content without configuring `maxLineWidth`: +```xml +text bold more
+``` +stays unchanged. + +#### Notes + +The [`xml.format.preserveSpace`](#xmlformatpreservespace) setting takes priority over `xml.format.mixedContent`. If an element is listed in `preserveSpace`, its content is always preserved regardless of the `mixedContent` setting. + +**Not supported by the legacy formatter.** + +*** + +### xml.format.blockElements + +Element names to treat as block in mixed content. Default is `[]` (empty — no block elements). + +This setting controls which child elements get their own line (block) and which stay on the same line as surrounding text (inline). Since XML is not HTML, there is no universal list of "block" elements — element names are specific to each XML vocabulary (XHTML, MyBatis, DocBook, etc.), so no default list is provided. + +The two possible configurations: + +* **`[]` (default)** — No elements are block. All elements stay inline with surrounding text, and only move to a new line when they overflow `maxLineWidth`. This is the backward-compatible behavior. + +* **`["div", "section"]` (explicit list)** — Listed elements are block (always on their own line with indentation). All other elements stay inline. Use this for prose XML where you know which elements are structural blocks. + +For example, with this input containing `` (inline) and `Click here to see the
Click here to see the +