Document Editor | Formatting & Editing
Word’s Home tab, on both hosts. Every command is a DocumentEditorController method first, so a host
with its own chrome gets the same behaviour.
Clipboard and Format Painter
Section titled “Clipboard and Format Painter”Copy() / Cut() return the plain text for the system clipboard and keep a formatted copy.
Paste(systemText) pastes that copy with its formatting when the system clipboard still holds what
was copied here, and pastes plain text otherwise. PasteText is Keep Text Only (newlines become
paragraphs). Comment anchors, bookmarks and footnote references are left out of a copy, since they are
unique per document.
On MAUI the surface’s CopyAsync / CutAsync / PasteAsync go through Clipboard.Default; on Blazor
through navigator.clipboard and the browser’s paste event.
Format Painter (CopyFormatting(sticky), Ctrl+Shift+C /
Ctrl+Shift+V): pick up the caret’s formatting, then select text — the
paint happens when the selecting gesture ends (CompletePointerGesture). A selection covering whole
paragraphs takes their paragraph formatting too.
Font and Paragraph
Section titled “Font and Paragraph”GrowFont / ShrinkFont |
Word’s size steps (Ctrl+Shift+> / <) |
ChangeCase(TextCase) |
Sentence / lower / UPPER / Capitalize / tOGGLE; Shift+F3 cycles |
ToggleSubscript / ToggleSuperscript |
Ctrl+= / Ctrl+Shift+= |
ClearFormatting |
Direct character formatting off, paragraphs back to Normal (lists kept) |
SetLineSpacing(1.15), SetParagraphSpacing(before, after) |
Multiples of single; spacing in points (Ctrl+1 / 5 / 2) |
ChangeIndent(±1), SetIndents(left, right, firstLine) |
Half an inch per press for ordinary paragraphs (a list item moves a level); a negative first line is a hanging indent |
SetParagraphShading(color), SetParagraphBorders(preset) |
Drawn and saved (w:shd, w:pBdr) |
ShowFormattingMarks |
Pilcrows and space dots — a view setting, Ctrl+Shift+8 |
TextCase is shared with the slide editor (Shiny.Controls.Office.Text).
Every run and paragraph property is written at its schema position — w:rPr and w:pPr are sequences,
and a w:color after a w:u is a file Word calls corrupt — which the test suite checks by
schema-validating every feature’s saved output.
Indents and tab stops can also be dragged on the ruler above the page; see Page Layout & Views.
Styles
Section titled “Styles”Home ▸ Styles is the “AaBbCcDd” gallery (OfficeStyleGallery, a RibbonGallery),
and this is the API it binds to:
IReadOnlyList<DocumentStyleInfo> styles = c.AvailableStyles; // Id, Name, FontFamily, FontSize (pt), Color, Bold, Italic, OutlineLevelstring current = c.CurrentStyleId; // also CaretFormat.StyleIdc.ApplyStyle("Heading2"); // creates Word's definition when the document lacks itc.CurrentStyleChanged += ...; // the caret moved onto a different styleAvailableStyles is Word’s gallery set — Normal, No Spacing, Heading 1-3, Title, Subtitle, Quote,
Intense Quote, List Paragraph — followed by the document’s own visible paragraph styles, each with the
formatting to preview it in. Applying a built-in the document does not define writes Word’s own
definition (ids, names, basedOn chain) into styles.xml first, so it shows in Word’s gallery by its
usual name. Ctrl+Alt+1..3 apply the headings and
Ctrl+Shift+N Normal.
Find and Replace
Section titled “Find and Replace”Ctrl+H (Home ▸ Editing ▸ Replace) opens Replace: Find Next, Replace, Replace All, with Match case and Whole words. Replace All is one undo step, and the replacement keeps the formatting of the text it replaces. Find and Replace both cover table cells.
c.Find.Query = "colour";c.ReplaceCurrent("color"); // replaces the hit the selection is on, steps onvar n = c.ReplaceAll("colour", "color", new FindOptions { MatchCase = true });The find box itself — the 3/12 readout, wrapping and keys — is described on
Find in Office Documents.


