OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
main
/
ts
/
fmt
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 05:44:43 AM
rwxr-xr-x
📄
ApplyFormat.ts
11.18 KB
02/20/2020 05:43:19 AM
rw-r--r--
📄
CaretFormat.ts
10.27 KB
02/20/2020 05:43:19 AM
rw-r--r--
📄
DefaultFormats.ts
5.17 KB
02/20/2020 05:43:20 AM
rw-r--r--
📄
ExpandRange.ts
12.32 KB
02/20/2020 05:43:21 AM
rw-r--r--
📄
FontInfo.ts
2.1 KB
02/20/2020 05:43:21 AM
rw-r--r--
📄
FormatChanged.ts
4.52 KB
02/20/2020 05:43:22 AM
rw-r--r--
📄
FormatContainer.ts
706 bytes
02/20/2020 05:43:22 AM
rw-r--r--
📄
FormatRegistry.ts
2.7 KB
02/20/2020 05:43:23 AM
rw-r--r--
📄
FormatUtils.ts
4.83 KB
02/20/2020 05:43:23 AM
rw-r--r--
📄
Hooks.ts
1.56 KB
02/20/2020 05:43:24 AM
rw-r--r--
📄
MatchFormat.ts
5.54 KB
02/20/2020 05:43:24 AM
rw-r--r--
📄
MergeFormats.ts
6.75 KB
02/20/2020 05:43:25 AM
rw-r--r--
📄
Preview.ts
8.79 KB
02/20/2020 05:43:26 AM
rw-r--r--
📄
RemoveFormat.ts
18.89 KB
02/20/2020 05:43:26 AM
rw-r--r--
📄
ToggleFormat.ts
842 bytes
02/20/2020 05:43:27 AM
rw-r--r--
Editing: ToggleFormat.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 ApplyFormat from './ApplyFormat'; import MatchFormat from './MatchFormat'; import RemoveFormat from './RemoveFormat'; import Editor from '../api/Editor'; import { FormatRegistry } from './FormatRegistry'; const toggle = function (editor: Editor, formats: FormatRegistry, name: string, vars, node) { const fmt = formats.get(name); if (MatchFormat.match(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) { RemoveFormat.remove(editor, name, vars, node); } else { ApplyFormat.applyFormat(editor, name, vars, node); } }; export default { toggle };