tinymce.dom.BookmarkManager
This class handles selection bookmarks.
Summary
Constructors
| Name | Summary | Defined by | 
|---|---|---|
| Constructs a new BookmarkManager instance for a specific selection instance. | 
Methods
| Name | Summary | Defined by | 
|---|---|---|
| Returns a bookmark location for the current selection. This bookmark object can then be used to restore the selection after some content modification to the document. | ||
| Returns true/false if the specified node is a bookmark node or not. | ||
| Restores the selection to the specified bookmark. | 
Constructors
BookmarkManager
public constructor function BookmarkManager(selection: tinymce.dom.Selection)Constructs a new BookmarkManager instance for a specific selection instance.
Parameters
- 
selection (Selection)- Selection instance to handle bookmarks for.
Methods
getBookmark()
getBookmark(type: Number, normalized: Boolean): ObjectReturns a bookmark location for the current selection. This bookmark object can then be used to restore the selection after some content modification to the document.
Examples
// Stores a bookmark of the current selection
var bm = tinymce.activeEditor.selection.getBookmark();
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');
// Restore the selection bookmark
tinymce.activeEditor.selection.moveToBookmark(bm);isBookmarkNode()
isBookmarkNode(node: DOMNode): BooleanReturns true/false if the specified node is a bookmark node or not.
moveToBookmark()
moveToBookmark(bookmark: Object)Restores the selection to the specified bookmark.