OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
silver
/
main
/
ts
/
ui
/
core
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:40:48 AM
rwxr-xr-x
📄
AlignmentButtons.ts
1.45 KB
02/20/2020 06:38:07 AM
rw-r--r--
📄
ComplexControls.ts
716 bytes
02/20/2020 06:38:08 AM
rw-r--r--
📄
FormatControls.ts
1015 bytes
02/20/2020 06:38:08 AM
rw-r--r--
📄
IndentOutdent.ts
1.16 KB
02/20/2020 06:38:09 AM
rw-r--r--
📄
LinkTargets.ts
4.05 KB
02/20/2020 06:38:10 AM
rw-r--r--
📄
SimpleControls.ts
4.59 KB
02/20/2020 06:38:10 AM
rw-r--r--
📄
UndoRedo.ts
1.9 KB
02/20/2020 06:38:11 AM
rw-r--r--
📄
VisualAid.ts
1.22 KB
02/20/2020 06:38:11 AM
rw-r--r--
📁
color
-
02/20/2020 06:40:29 AM
rwxr-xr-x
📁
complex
-
02/20/2020 06:42:37 AM
rwxr-xr-x
Editing: AlignmentButtons.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 Editor from 'tinymce/core/api/Editor'; import Tools from 'tinymce/core/api/util/Tools'; import { onSetupFormatToggle } from './complex/utils/Utils'; const register = (editor: Editor) => { const alignToolbarButtons = [ { name: 'alignleft', text: 'Align left', cmd: 'JustifyLeft', icon: 'align-left' }, { name: 'aligncenter', text: 'Align center', cmd: 'JustifyCenter', icon: 'align-center' }, { name: 'alignright', text: 'Align right', cmd: 'JustifyRight', icon: 'align-right' }, { name: 'alignjustify', text: 'Justify', cmd: 'JustifyFull', icon: 'align-justify' } ]; Tools.each(alignToolbarButtons, (item) => { editor.ui.registry.addToggleButton(item.name, { tooltip: item.text, onAction: () => editor.execCommand(item.cmd), icon: item.icon, onSetup: onSetupFormatToggle(editor, item.name) }); }); const alignNoneToolbarButton = { name: 'alignnone', text: 'No alignment', cmd: 'JustifyNone', icon: 'align-none' }; editor.ui.registry.addButton(alignNoneToolbarButton.name, { tooltip: alignNoneToolbarButton.text, onAction: () => editor.execCommand(alignNoneToolbarButton.cmd), icon: alignNoneToolbarButton.icon }); }; export default { register };