--- name: ms-teams-text-formatting description: Apply bold, italic, underline, strikethrough, lists, quotes, code, links, or toolbar formatting to Microsoft Teams compose-box text using agent-browser. Use only when the user asks to format text in a Teams message. --- # MS Teams text formatting Teams uses CKEditor in a contenteditable compose box. Focus the editor and use `agent-browser press ` for keyboard shortcuts. ## Inline formatting Type text, select the intended range (`Control+a` for all or Shift+Arrow for a smaller range), then press: | Format | agent-browser command | | --- | --- | | Bold | `agent-browser press Control+b` | | Italic | `agent-browser press Control+i` | | Underline | `agent-browser press Control+u` | | Strikethrough | `agent-browser press Control+Alt+x` | Shortcuts toggle the format and can be combined. ## Block formatting | Format | Method | | --- | --- | | Bulleted list | type `*` or `-`, then press Space at line start | | Numbered list | type `1.` or `1)`, then press Space at line start | | Quote | `agent-browser press Control+Alt+4` | | Inline code | `agent-browser press Control+Alt+Shift+c` | | Code block | `agent-browser press Control+Alt+Shift+b` | | Link dialog | `agent-browser press Control+k` | ## Toolbar-only formatting Open formatting with: ```bash agent-browser press Control+Shift+x agent-browser snapshot -i -c ``` Then use fresh accessibility refs for controls such as Text highlight color, Font color, Font size, Paragraph, Clear all formatting, indentation, or horizontal rule. Prefer a semantic locator when reliable: ```bash agent-browser find role button click --name 'Font color' ``` If the control is not represented accessibly, use a narrow query: ```bash agent-browser eval '(() => { const b=Array.from(document.querySelectorAll("button")).find(x=>x.getAttribute("aria-label")==="Font color"); if (!b) return "not found"; b.click(); return "clicked"; })()' ``` Take a fresh snapshot after opening a menu or dialog. Verify formatting through the snapshot or a narrow inspection of the compose box. Do not send the message unless the user explicitly requested sending.