OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
main
/
ts
/
annotate
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 05:44:43 AM
rwxr-xr-x
📄
AnnotationChanges.ts
3.4 KB
02/20/2020 05:41:47 AM
rw-r--r--
📄
AnnotationContext.ts
1.82 KB
02/20/2020 05:41:46 AM
rw-r--r--
📄
AnnotationFilter.ts
1 KB
02/20/2020 05:41:47 AM
rw-r--r--
📄
AnnotationsRegistry.ts
1.02 KB
02/20/2020 05:41:48 AM
rw-r--r--
📄
Identification.ts
2.51 KB
02/20/2020 05:41:48 AM
rw-r--r--
📄
Markings.ts
532 bytes
02/20/2020 05:41:49 AM
rw-r--r--
📄
Wrapping.ts
5.2 KB
02/20/2020 05:41:49 AM
rw-r--r--
Editing: AnnotationsRegistry.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 { Decorator } from './Wrapping'; import { Option } from '@ephox/katamari'; export interface AnnotatorSettings { decorate: Decorator; persistent?: boolean; } export interface AnnotationsRegistry { register: (name: string, settings: AnnotatorSettings) => void; lookup: (name: string) => Option<AnnotatorSettings>; } const create = (): AnnotationsRegistry => { const annotations = { }; const register = (name: string, settings: AnnotatorSettings): void => { annotations[name] = { name, settings }; }; const lookup = (name: string): Option<AnnotatorSettings> => { return annotations.hasOwnProperty(name) ? Option.from(annotations[name]).map((a) => a.settings) : Option.none(); }; return { register, lookup }; }; export { create };