Skip to main content
Draw attention with underlined text. Traditional emphasis technique, automatically applied to links.

OOXML Structure

<w:r>
  <w:rPr>
    <w:u w:val="single"/>
  </w:rPr>
  <w:t>Underlined text</w:t>
</w:r>

Use Case

  • Legal documents - Emphasize terms and conditions
  • Forms - Indicate fill-in areas: _____________
  • Headings - Alternative to bold
  • Links - Automatic with hyperlinks
  • Emphasis - Triple emphasis with bold + italic + underline

Options

Configure the extension behavior:
htmlAttributes
Object
default:"{}"
HTML attributes for underline elements

Attributes

Node attributes that can be set and retrieved:
underlineType
UnderlineConfig
default:"single"
Style of underline

Commands

setUnderline

Apply underline formatting Example:
editor.commands.setUnderline()
Returns: Function Command

unsetUnderline

Remove underline formatting Example:
editor.commands.unsetUnderline()
Returns: Function Command

toggleUnderline

Toggle underline formatting Example:
editor.commands.toggleUnderline()
Returns: Function Command

Keyboard Shortcuts

CommandShortcutDescription
toggleUnderline()⌘/Ctrl-uToggle underline formatting
toggleUnderline()⌘/Ctrl-UToggle underline formatting (uppercase)

Types

UnderlineConfig

Underline style configuration

Source Code

⌘I