OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
themes
/
mobile
/
test
/
ts
/
module
/
test
/
ui
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:40:19 AM
rwxr-xr-x
📄
TestEditor.ts
1.31 KB
02/20/2020 06:40:21 AM
rw-r--r--
📄
TestFrameEditor.ts
2.38 KB
02/20/2020 06:40:22 AM
rw-r--r--
📄
TestSelectors.ts
174 bytes
02/20/2020 06:40:24 AM
rw-r--r--
📄
TestStyles.ts
1.28 KB
02/20/2020 06:40:23 AM
rw-r--r--
📄
TestUi.ts
2.1 KB
02/20/2020 06:40:24 AM
rw-r--r--
Editing: TestEditor.ts
Close
import { Step } from '@ephox/agar'; import { Objects } from '@ephox/boulder'; import { Cell, Fun } from '@ephox/katamari'; import { TestHelpers } from '@ephox/alloy'; export default function () { const store = TestHelpers.TestStore(); const editorState = { start: Cell(null), content: Cell('') }; const sPrepareState = function (node, content) { return Step.sync(function () { editorState.start.set(node); editorState.content.set(content); }); }; const editor = { selection: { getStart: editorState.start.get, getContent: editorState.content.get, select: Fun.noop }, insertContent (data) { store.adder({ method: 'insertContent', data })(); }, execCommand (name, ui, args) { store.adder({ method: 'execCommand', data: Objects.wrap(name, args) })(); }, dom: { createHTML (tag, attributes, innerText) { return { tag, attributes, innerText }; }, encode: Fun.identity }, focus: Fun.noop, ui: { registry: { getAll: () => { return { icons: {} }; } } } }; return { editor: Fun.constant(editor), adder: store.adder, assertEq: store.assertEq, sAssertEq: store.sAssertEq, sClear: store.sClear, sPrepareState }; }