PHP Classes

File: public/js/tinymce/src/themes/mobile/src/test/js/module/test/ui/TestEditor.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/themes/mobile/src/test/js/module/test/ui/TestEditor.js   Download  
File: public/js/tinymce/src/themes/mobile/src/test/js/module/test/ui/TestEditor.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,565 bytes
 

Contents

Class file image Download
define( 'tinymce.themes.mobile.test.ui.TestEditor', [ 'ephox.agar.api.Step', 'ephox.alloy.test.TestStore', 'ephox.boulder.api.Objects', 'ephox.katamari.api.Cell', 'ephox.katamari.api.Fun', 'global!document' ], function (Step, TestStore, Objects, Cell, Fun, document) { return function () { var store = TestStore(); var editorState = { start: Cell(null), content: Cell('') }; var sPrepareState = function (node, content) { return Step.sync(function () { editorState.start.set(node); editorState.content.set(content); }); }; var editor = { selection: { getStart: editorState.start.get, getContent: editorState.content.get, select: Fun.noop }, insertContent: function (data) { store.adder({ method: 'insertContent', data: data })(); }, execCommand: function (name, ui, args) { store.adder({ method: 'execCommand', data: Objects.wrap(name, args) })(); }, dom: { createHTML: function (tag, attributes, innerText) { return { tag: tag, attributes: attributes, innerText: innerText }; }, encode: Fun.identity }, focus: Fun.noop }; return { editor: Fun.constant(editor), adder: store.adder, assertEq: store.assertEq, sAssertEq: store.sAssertEq, sClear: store.sClear, sPrepareState: sPrepareState }; }; } );