OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
main
/
ts
/
bookmark
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 05:44:43 AM
rwxr-xr-x
📄
BookmarkTypes.ts
1.4 KB
02/20/2020 05:42:14 AM
rw-r--r--
📄
Bookmarks.ts
1.07 KB
02/20/2020 05:42:14 AM
rw-r--r--
📄
CaretBookmark.ts
6.29 KB
02/20/2020 05:42:15 AM
rw-r--r--
📄
GetBookmark.ts
7.11 KB
02/20/2020 05:42:16 AM
rw-r--r--
📄
ResolveBookmark.ts
8.02 KB
02/20/2020 05:42:16 AM
rw-r--r--
Editing: Bookmarks.ts
Close
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ import GetBookmark from './GetBookmark'; import ResolveBookmark from './ResolveBookmark'; import Selection from '../api/dom/Selection'; import NodeType from '../dom/NodeType'; import { Bookmark } from './BookmarkTypes'; import { Node } from '@ephox/dom-globals'; const getBookmark = function (selection: Selection, type: number, normalized: boolean): Bookmark { return GetBookmark.getBookmark(selection, type, normalized); }; const moveToBookmark = function (selection: Selection, bookmark: Bookmark) { ResolveBookmark.resolve(selection, bookmark).each(function (rng) { selection.setRng(rng); }); }; const isBookmarkNode = function (node: Node) { return NodeType.isElement(node) && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark'; }; export default { getBookmark, moveToBookmark, isBookmarkNode };