Skip to main content
Create invisible navigation anchors for cross-references and document navigation. Essential for long documents, table of contents, and internal hyperlinks with perfect Word compatibility.

OOXML Structure

<!-- Bookmark start and end tags -->
<w:bookmarkStart w:id="0" w:name="chapter1"/>
<w:r>
  <w:t>Chapter content here</w:t>
</w:r>
<w:bookmarkEnd w:id="0"/>

<!-- Hyperlink to bookmark -->
<w:hyperlink w:anchor="chapter1">
  <w:r>
    <w:t>Go to Chapter 1</w:t>
  </w:r>
</w:hyperlink>

Use case

  • Table of Contents - Create clickable TOC entries that jump to chapters
  • Cross-References - Link to figures, tables, or sections elsewhere
  • Navigation - Quick jumps in long documents without scrolling
  • Index Creation - Mark important terms for automated index generation
  • Document Automation - Programmatic navigation and content updates

Commands

insertBookmark

Insert a bookmark at the current cursor position. Bookmarks are invisible navigation anchors used for cross-references and document navigation. Example:
editor.commands.insertBookmark({ name: 'chapter1' })
editor.commands.insertBookmark({ name: 'introduction', id: 'intro-001' })
Parameters:
config
Object
required
Object with name (required bookmark name) and optional id (unique identifier)

goToBookmark

Navigate to a bookmark by name. Scrolls the document to the bookmark position. Example:
editor.commands.goToBookmark('chapter1')
Parameters:
name
string
required
Bookmark name to navigate to

Attributes

BookmarkStart

name
string
Bookmark name for cross-references and navigation
id
string
Unique identifier for the bookmark

BookmarkEnd

id
string
Identifier matching the corresponding bookmarkStart

Source code