OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
mobile
/
main
/
ts
/
ui
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:45:48 AM
rwxr-xr-x
📄
AndroidRealm.ts
2.43 KB
02/20/2020 06:32:39 AM
rw-r--r--
📄
Buttons.ts
2.4 KB
02/20/2020 06:32:40 AM
rw-r--r--
📄
ColorSlider.ts
3.21 KB
02/20/2020 06:32:40 AM
rw-r--r--
📄
CommonRealm.ts
1.49 KB
02/20/2020 06:32:41 AM
rw-r--r--
📄
Dropup.ts
2.38 KB
02/20/2020 06:32:41 AM
rw-r--r--
📄
FontSizeSlider.ts
1.34 KB
02/20/2020 06:32:42 AM
rw-r--r--
📄
HeadingSlider.ts
1.63 KB
02/20/2020 06:32:42 AM
rw-r--r--
📄
ImagePicker.ts
2.13 KB
02/20/2020 06:32:43 AM
rw-r--r--
📄
Inputs.ts
2.86 KB
02/20/2020 06:32:43 AM
rw-r--r--
📄
IosRealm.ts
2.65 KB
02/20/2020 06:32:44 AM
rw-r--r--
📄
LinkButton.ts
2.33 KB
02/20/2020 06:32:45 AM
rw-r--r--
📄
OuterContainer.ts
953 bytes
02/20/2020 06:32:45 AM
rw-r--r--
📄
SerialisedDialog.ts
8.2 KB
02/20/2020 06:32:46 AM
rw-r--r--
📄
SizeSlider.ts
2.32 KB
02/20/2020 06:32:46 AM
rw-r--r--
📄
StylesMenu.ts
6.51 KB
02/20/2020 06:32:47 AM
rw-r--r--
📄
ToolbarWidgets.ts
645 bytes
02/20/2020 06:32:47 AM
rw-r--r--
Editing: AndroidRealm.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 { Replacing, Gui, AlloyComponent } from '@ephox/alloy'; import { Fun, Singleton } from '@ephox/katamari'; import AndroidWebapp from '../api/AndroidWebapp'; import Styles from '../style/Styles'; import ScrollingToolbar from '../toolbar/ScrollingToolbar'; import CommonRealm from './CommonRealm'; import * as Dropup from './Dropup'; import OuterContainer from './OuterContainer'; import { SugarElement } from 'tinymce/themes/mobile/alien/TypeDefinitions'; import { MobileRealm } from 'tinymce/themes/mobile/ui/IosRealm'; import { MobileWebApp } from 'tinymce/themes/mobile/api/IosWebapp'; export default function (scrollIntoView: () => void) { const alloy = OuterContainer({ classes: [ Styles.resolve('android-container') ] }) as Gui.GuiSystem; const toolbar = ScrollingToolbar(); const webapp = Singleton.api<MobileWebApp>(); const switchToEdit = CommonRealm.makeEditSwitch(webapp); const socket = CommonRealm.makeSocket() as AlloyComponent; const dropup = Dropup.build(Fun.noop, scrollIntoView); alloy.add(toolbar.wrapper()); alloy.add(socket); alloy.add(dropup.component()); const setToolbarGroups = function (rawGroups) { const groups = toolbar.createGroups(rawGroups); toolbar.setGroups(groups); }; const setContextToolbar = function (rawGroups) { const groups = toolbar.createGroups(rawGroups); toolbar.setContextToolbar(groups); }; // You do not always want to do this. const focusToolbar = function () { toolbar.focus(); }; const restoreToolbar = function () { toolbar.restoreToolbar(); }; const init = function (spec) { webapp.set( AndroidWebapp.produce(spec) ); }; const exit = function () { webapp.run(function (w) { w.exit(); Replacing.remove(socket, switchToEdit); }); }; const updateMode = function (readOnly) { CommonRealm.updateMode(socket, switchToEdit, readOnly, alloy.root()); }; return { system: Fun.constant(alloy), element: alloy.element as () => SugarElement, init, exit, setToolbarGroups, setContextToolbar, focusToolbar, restoreToolbar, updateMode, socket: Fun.constant(socket), dropup: Fun.constant(dropup) } as MobileRealm; }