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: DefaultFormats.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 Tools from '../api/util/Tools'; import { Formats } from '../api/fmt/Format'; const get = function (dom) { const formats: Formats = { valigntop: [ { selector: 'td,th', styles: { verticalAlign: 'top' } } ], valignmiddle: [ { selector: 'td,th', styles: { verticalAlign: 'middle' } } ], valignbottom: [ { selector: 'td,th', styles: { verticalAlign: 'bottom' } } ], alignleft: [ { selector: 'figure.image', collapsed: false, classes: 'align-left', ceFalseOverride: true, preview: 'font-family font-size' }, { selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: { textAlign: 'left' }, inherit: false, preview: false, defaultBlock: 'div' }, { selector: 'img,table', collapsed: false, styles: { float: 'left' }, preview: 'font-family font-size' } ], aligncenter: [ { selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: { textAlign: 'center' }, inherit: false, preview: 'font-family font-size', defaultBlock: 'div' }, { selector: 'figure.image', collapsed: false, classes: 'align-center', ceFalseOverride: true, preview: 'font-family font-size' }, { selector: 'img', collapsed: false, styles: { display: 'block', marginLeft: 'auto', marginRight: 'auto' }, preview: false }, { selector: 'table', collapsed: false, styles: { marginLeft: 'auto', marginRight: 'auto' }, preview: 'font-family font-size' } ], alignright: [ { selector: 'figure.image', collapsed: false, classes: 'align-right', ceFalseOverride: true, preview: 'font-family font-size' }, { selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: { textAlign: 'right' }, inherit: false, preview: 'font-family font-size', defaultBlock: 'div' }, { selector: 'img,table', collapsed: false, styles: { float: 'right' }, preview: 'font-family font-size' } ], alignjustify: [ { selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li', styles: { textAlign: 'justify' }, inherit: false, defaultBlock: 'div', preview: 'font-family font-size' } ], bold: [ { inline: 'strong', remove: 'all' }, { inline: 'span', styles: { fontWeight: 'bold' } }, { inline: 'b', remove: 'all' } ], italic: [ { inline: 'em', remove: 'all' }, { inline: 'span', styles: { fontStyle: 'italic' } }, { inline: 'i', remove: 'all' } ], underline: [ { inline: 'span', styles: { textDecoration: 'underline' }, exact: true }, { inline: 'u', remove: 'all' } ], strikethrough: [ { inline: 'span', styles: { textDecoration: 'line-through' }, exact: true }, { inline: 'strike', remove: 'all' } ], forecolor: { inline: 'span', styles: { color: '%value' }, links: true, remove_similar: true, clear_child_styles: true }, hilitecolor: { inline: 'span', styles: { backgroundColor: '%value' }, links: true, remove_similar: true, clear_child_styles: true }, fontname: { inline: 'span', toggle: false, styles: { fontFamily: '%value' }, clear_child_styles: true }, fontsize: { inline: 'span', toggle: false, styles: { fontSize: '%value' }, clear_child_styles: true }, fontsize_class: { inline: 'span', attributes: { class: '%value' } }, blockquote: { block: 'blockquote', wrapper: true, remove: 'all' }, subscript: { inline: 'sub' }, superscript: { inline: 'sup' }, code: { inline: 'code' }, link: { inline: 'a', selector: 'a', remove: 'all', split: true, deep: true, onmatch () { return true; }, onformat (elm, fmt, vars) { Tools.each(vars, function (value, key) { dom.setAttrib(elm, key, value); }); } }, removeformat: [ { selector: 'b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins', remove: 'all', split: true, expand: false, block_expand: true, deep: true }, { selector: 'span', attributes: ['style', 'class'], remove: 'empty', split: true, expand: false, deep: true }, { selector: '*', attributes: ['style', 'class'], split: false, expand: false, deep: true } ] }; Tools.each('p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp'.split(/\s/), function (name) { formats[name] = { block: name, remove: 'all' }; }); return formats; }; export default { get };