OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
main
/
ts
/
api
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 05:44:43 AM
rwxr-xr-x
📄
AddOnManager.ts
9.83 KB
02/20/2020 05:41:54 AM
rw-r--r--
📄
Annotator.ts
3.54 KB
02/20/2020 05:41:53 AM
rw-r--r--
📄
Editor.ts
35.88 KB
02/20/2020 05:41:55 AM
rw-r--r--
📄
EditorCommands.ts
16.78 KB
02/20/2020 05:41:55 AM
rw-r--r--
📄
EditorManager.ts
22 KB
02/20/2020 05:41:56 AM
rw-r--r--
📄
EditorObservable.ts
5.88 KB
02/20/2020 05:41:56 AM
rw-r--r--
📄
EditorUpload.ts
8.24 KB
02/20/2020 05:41:57 AM
rw-r--r--
📄
Env.ts
5.05 KB
02/20/2020 05:41:57 AM
rw-r--r--
📄
EventTypes.ts
3.4 KB
02/20/2020 05:41:58 AM
rw-r--r--
📄
Events.ts
1.17 KB
02/20/2020 05:41:58 AM
rw-r--r--
📄
FocusManager.ts
1.37 KB
02/20/2020 05:41:59 AM
rw-r--r--
📄
Formatter.ts
7.65 KB
02/20/2020 05:41:59 AM
rw-r--r--
📄
IconManager.ts
992 bytes
02/20/2020 05:42:00 AM
rw-r--r--
📄
Main.ts
786 bytes
02/20/2020 05:42:01 AM
rw-r--r--
📄
NotificationManager.ts
5.03 KB
02/20/2020 05:42:02 AM
rw-r--r--
📄
PluginManager.ts
493 bytes
02/20/2020 05:42:04 AM
rw-r--r--
📄
Settings.ts
5.44 KB
02/20/2020 05:42:04 AM
rw-r--r--
📄
SettingsTypes.ts
6.75 KB
02/20/2020 05:42:05 AM
rw-r--r--
📄
Shortcuts.ts
6.68 KB
02/20/2020 05:42:05 AM
rw-r--r--
📄
ThemeManager.ts
1016 bytes
02/20/2020 05:42:06 AM
rw-r--r--
📄
Tinymce.ts
7.54 KB
02/20/2020 05:42:06 AM
rw-r--r--
📄
UndoManager.ts
11.93 KB
02/20/2020 05:42:09 AM
rw-r--r--
📄
WindowManager.ts
7.1 KB
02/20/2020 05:42:09 AM
rw-r--r--
📁
dom
-
02/20/2020 06:46:12 AM
rwxr-xr-x
📁
file
-
02/20/2020 06:11:56 AM
rwxr-xr-x
📁
fmt
-
02/20/2020 06:11:59 AM
rwxr-xr-x
📁
geom
-
02/20/2020 06:12:03 AM
rwxr-xr-x
📁
html
-
02/20/2020 06:12:08 AM
rwxr-xr-x
📁
ui
-
02/20/2020 06:12:12 AM
rwxr-xr-x
📁
util
-
02/20/2020 06:12:21 AM
rwxr-xr-x
Editing: Settings.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 { HTMLImageElement } from '@ephox/dom-globals'; import { Fun, Type, Strings, Arr } from '@ephox/katamari'; import Editor from './Editor'; import Tools from './util/Tools'; import { UploadHandler } from '../file/Uploader'; const getBodySetting = (editor: Editor, name: string, defaultValue: string) => { const value = editor.getParam(name, defaultValue); if (value.indexOf('=') !== -1) { const bodyObj = editor.getParam(name, '', 'hash'); return bodyObj.hasOwnProperty(editor.id) ? bodyObj[editor.id] : defaultValue; } else { return value; } }; const getIframeAttrs = (editor: Editor): Record<string, string> => { return editor.getParam('iframe_attrs', {}); }; const getDocType = (editor: Editor): string => { return editor.getParam('doctype', '<!DOCTYPE html>'); }; const getDocumentBaseUrl = (editor: Editor): string => { return editor.getParam('document_base_url', ''); }; const getBodyId = (editor: Editor): string => { return getBodySetting(editor, 'body_id', 'tinymce'); }; const getBodyClass = (editor: Editor): string => { return getBodySetting(editor, 'body_class', ''); }; const getContentSecurityPolicy = (editor: Editor): string => { return editor.getParam('content_security_policy', ''); }; const shouldPutBrInPre = (editor: Editor): boolean => { return editor.getParam('br_in_pre', true); }; const getForcedRootBlock = (editor: Editor): string => { // Legacy option if (editor.getParam('force_p_newlines', false)) { return 'p'; } const block = editor.getParam('forced_root_block', 'p'); if (block === false) { return ''; } else if (block === true) { return 'p'; } else { return block; } }; const getForcedRootBlockAttrs = (editor: Editor): Record<string, string> => { return editor.getParam('forced_root_block_attrs', {}); }; const getBrNewLineSelector = (editor: Editor): string => { return editor.getParam('br_newline_selector', '.mce-toc h2,figcaption,caption'); }; const getNoNewLineSelector = (editor: Editor): string => { return editor.getParam('no_newline_selector', ''); }; const shouldKeepStyles = (editor: Editor): boolean => { return editor.getParam('keep_styles', true); }; const shouldEndContainerOnEmptyBlock = (editor: Editor): boolean => { return editor.getParam('end_container_on_empty_block', false); }; const getFontStyleValues = (editor: Editor): string[] => Tools.explode(editor.getParam('font_size_style_values', '')); const getFontSizeClasses = (editor: Editor): string[] => Tools.explode(editor.getParam('font_size_classes', '')); const getImagesDataImgFilter = (editor: Editor): (imgElm: HTMLImageElement) => boolean => { return editor.getParam('images_dataimg_filter', Fun.constant(true), 'function'); }; const isAutomaticUploadsEnabled = (editor: Editor): boolean => { return editor.getParam('automatic_uploads', true, 'boolean'); }; const shouldReuseFileName = (editor: Editor): boolean => { return editor.getParam('images_reuse_filename', false, 'boolean'); }; const shouldReplaceBlobUris = (editor: Editor): boolean => { return editor.getParam('images_replace_blob_uris', true, 'boolean'); }; const getImageUploadUrl = (editor: Editor): string => { return editor.getParam('images_upload_url', '', 'string'); }; const getImageUploadBasePath = (editor: Editor): string => { return editor.getParam('images_upload_base_path', '', 'string'); }; const getImagesUploadCredentials = (editor: Editor): boolean => { return editor.getParam('images_upload_credentials', false, 'boolean'); }; const getImagesUploadHandler = (editor: Editor): UploadHandler => { return editor.getParam('images_upload_handler', null, 'function'); }; const shouldUseContentCssCors = (editor: Editor): boolean => { return editor.getParam('content_css_cors', false, 'boolean'); }; const getLanguageCode = (editor: Editor): string => { return editor.getParam('language', 'en', 'string'); }; const getLanguageUrl = (editor: Editor): string => { return editor.getParam('language_url', '', 'string'); }; const shouldIndentUseMargin = (editor: Editor): boolean => { return editor.getParam('indent_use_margin', false); }; const getIndentation = (editor: Editor): string => { return editor.getParam('indentation', '40px', 'string'); }; const getContentCss = (editor: Editor): string[] => { const contentCss = editor.settings.content_css; if (Type.isString(contentCss)) { return Arr.map(contentCss.split(','), Strings.trim); } else if (Type.isArray(contentCss)) { return contentCss; } else if (contentCss === false || editor.inline) { return []; } else { return ['default']; } }; export default { getIframeAttrs, getDocType, getDocumentBaseUrl, getBodyId, getBodyClass, getContentSecurityPolicy, shouldPutBrInPre, getForcedRootBlock, getForcedRootBlockAttrs, getBrNewLineSelector, getNoNewLineSelector, shouldKeepStyles, shouldEndContainerOnEmptyBlock, getFontStyleValues, getFontSizeClasses, getImagesDataImgFilter, isAutomaticUploadsEnabled, shouldReuseFileName, shouldReplaceBlobUris, getImageUploadUrl, getImageUploadBasePath, getImagesUploadCredentials, getImagesUploadHandler, shouldUseContentCssCors, getLanguageCode, getLanguageUrl, shouldIndentUseMargin, getIndentation, getContentCss };