OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
test
/
ts
/
browser
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:15:06 AM
rwxr-xr-x
📄
AddOnManagerTest.ts
2.71 KB
02/20/2020 05:44:53 AM
rw-r--r--
📄
ClickContentEditableFalseTest.ts
3.13 KB
02/20/2020 05:44:53 AM
rw-r--r--
📄
DragDropOverridesTest.ts
1.55 KB
02/20/2020 05:44:54 AM
rw-r--r--
📄
EditorForcedSettingsTest.ts
904 bytes
02/20/2020 05:44:54 AM
rw-r--r--
📄
EditorManagerTest.ts
7.41 KB
02/20/2020 05:44:55 AM
rw-r--r--
📄
EditorRemoveTest.ts
2.58 KB
02/20/2020 05:44:56 AM
rw-r--r--
📄
EditorRemovedApiTest.ts
2.98 KB
02/20/2020 05:44:55 AM
rw-r--r--
📄
EditorRtlTest.ts
1.39 KB
02/20/2020 05:44:56 AM
rw-r--r--
📄
EditorSettingsTest.ts
14.57 KB
02/20/2020 05:44:57 AM
rw-r--r--
📄
EditorTest.ts
15.89 KB
02/20/2020 05:44:57 AM
rw-r--r--
📄
EditorUploadTest.ts
11.16 KB
02/20/2020 05:44:58 AM
rw-r--r--
📄
EditorViewIframeTest.ts
3.35 KB
02/20/2020 05:44:58 AM
rw-r--r--
📄
EditorViewInlineTest.ts
3.25 KB
02/20/2020 05:44:59 AM
rw-r--r--
📄
FontSelectTest.ts
4.79 KB
02/20/2020 05:44:59 AM
rw-r--r--
📄
ForceBlocksTest.ts
4.89 KB
02/20/2020 05:45:00 AM
rw-r--r--
📄
FormatterApplyTest.ts
83.91 KB
02/20/2020 05:45:00 AM
rw-r--r--
📄
FormatterCheckTest.ts
10.05 KB
02/20/2020 05:45:01 AM
rw-r--r--
📄
FormatterRemoveTest.ts
24.06 KB
02/20/2020 05:45:01 AM
rw-r--r--
📄
FormattingCommandsTest.ts
19.5 KB
02/20/2020 05:45:02 AM
rw-r--r--
📄
InlineEditorRemoveTest.ts
1.17 KB
02/20/2020 05:45:03 AM
rw-r--r--
📄
InlineEditorSaveTest.ts
1.19 KB
02/20/2020 05:45:03 AM
rw-r--r--
📄
JqueryIntegrationTest.disabled
4.5 KB
02/20/2020 05:45:04 AM
rw-r--r--
📄
MiscCommandsTest.ts
3.61 KB
02/20/2020 05:45:05 AM
rw-r--r--
📄
ModeTest.ts
4.18 KB
02/20/2020 05:45:05 AM
rw-r--r--
📄
NotificationManagerTest.ts
4.01 KB
02/20/2020 05:45:06 AM
rw-r--r--
📄
SelectionOverridesTest.ts
10.48 KB
02/20/2020 05:45:06 AM
rw-r--r--
📄
ShortcutsTest.ts
3.67 KB
02/20/2020 05:45:07 AM
rw-r--r--
📄
UndoManagerTest.ts
14.65 KB
02/20/2020 05:45:07 AM
rw-r--r--
📄
WindowManagerTest.ts
1.29 KB
02/20/2020 05:45:08 AM
rw-r--r--
📁
annotate
-
02/20/2020 06:12:41 AM
rwxr-xr-x
📁
api
-
02/20/2020 06:34:15 AM
rwxr-xr-x
📁
bookmark
-
02/20/2020 06:12:48 AM
rwxr-xr-x
📁
caret
-
02/20/2020 06:12:58 AM
rwxr-xr-x
📁
commands
-
02/20/2020 06:13:03 AM
rwxr-xr-x
📁
content
-
02/20/2020 06:13:08 AM
rwxr-xr-x
📁
delete
-
02/20/2020 06:13:20 AM
rwxr-xr-x
📁
dom
-
02/20/2020 06:13:35 AM
rwxr-xr-x
📁
file
-
02/20/2020 06:13:40 AM
rwxr-xr-x
📁
fmt
-
02/20/2020 06:13:49 AM
rwxr-xr-x
📁
focus
-
02/20/2020 06:13:55 AM
rwxr-xr-x
📁
geom
-
02/20/2020 06:13:59 AM
rwxr-xr-x
📁
html
-
02/20/2020 06:14:06 AM
rwxr-xr-x
📁
init
-
02/20/2020 06:14:16 AM
rwxr-xr-x
📁
keyboard
-
02/20/2020 06:14:32 AM
rwxr-xr-x
📁
newline
-
02/20/2020 06:14:36 AM
rwxr-xr-x
📁
selection
-
02/20/2020 06:14:47 AM
rwxr-xr-x
📁
undo
-
02/20/2020 06:14:53 AM
rwxr-xr-x
📁
util
-
02/20/2020 06:15:03 AM
rwxr-xr-x
Editing: JqueryIntegrationTest.disabled
Close
import { Pipeline } from '@ephox/agar'; import { LegacyUnit } from '@ephox/mcagar'; import DOMUtils from 'tinymce/core/api/dom/DOMUtils'; import ScriptLoader from 'tinymce/core/api/dom/ScriptLoader'; import Editor from 'tinymce/core/api/Editor'; import EditorManager from 'tinymce/core/api/EditorManager'; import JqueryIntegration from 'tinymce/core/JqueryIntegration'; import PluginManager from 'tinymce/core/api/PluginManager'; import ViewBlock from '../module/test/ViewBlock'; import ThemeManager from 'tinymce/core/api/ThemeManager'; import Delay from 'tinymce/core/api/util/Delay'; import Tools from 'tinymce/core/api/util/Tools'; import Theme from 'tinymce/themes/silver/Theme'; import { UnitTest } from '@ephox/bedrock'; declare const window: any; UnitTest.asynctest('browser.tinymce.core.JqueryIntegrationTest', function() { var success = arguments[arguments.length - 2]; var failure = arguments[arguments.length - 1]; var suite = LegacyUnit.createSuite(); var viewBlock = ViewBlock(); var $; Theme(); var setup = function () { viewBlock.attach(); viewBlock.update( '<textarea id="elm1"></textarea>' + '<textarea id="elm2"></textarea>' + '<textarea id="elm3">Textarea</textarea>' ); }; var loadJquery = function (done) { var script = document.createElement('script'); script.src = '/project/tinymce/js/tinymce/skins/ui/oxide/node_modules/jquery/dist/jquery.min.js'; script.onload = function () { script.parentNode.removeChild(script); $ = window.jQuery.noConflict(true); JqueryIntegration({ tinymce: EditorManager, jQuery: $ }); done(); }; document.body.appendChild(script); }; suite.asyncTest('Setup editors', function (_, done) { $(function () { $('#elm1,#elm2').tinymce({ base_url: '/project/tinymce/js/tinymce', init_instance_callback: function () { var ed1 = EditorManager.get('elm1'), ed2 = EditorManager.get('elm2'); // When both editors are initialized if (ed1 && ed1.initialized && ed2 && ed2.initialized) { done(); } } }); }); }); suite.test("Get editor instance", function () { LegacyUnit.equal($('#elm1').tinymce().id, 'elm1'); LegacyUnit.equal($('#elm2').tinymce().id, 'elm2'); LegacyUnit.equal($('#elm3').tinymce(), null); }); suite.test("Get contents using jQuery", function () { EditorManager.get('elm1').setContent('<p>Editor 1</p>'); LegacyUnit.equal($('#elm1').html(), '<p>Editor 1</p>'); LegacyUnit.equal($('#elm1').val(), '<p>Editor 1</p>'); LegacyUnit.equal($('#elm1').attr('value'), '<p>Editor 1</p>'); LegacyUnit.equal($('#elm1').text(), 'Editor 1'); }); suite.test("Set contents using jQuery", function () { $('#elm1').html('Test 1'); LegacyUnit.equal($('#elm1').html(), '<p>Test 1</p>'); $('#elm1').val('Test 2'); LegacyUnit.equal($('#elm1').html(), '<p>Test 2</p>'); $('#elm1').text('Test 3'); LegacyUnit.equal($('#elm1').html(), '<p>Test 3</p>'); $('#elm1').attr('value', 'Test 4'); LegacyUnit.equal($('#elm1').html(), '<p>Test 4</p>'); }); suite.test("append/prepend contents using jQuery", function () { EditorManager.get('elm1').setContent('<p>Editor 1</p>'); $('#elm1').append('<p>Test 1</p>'); LegacyUnit.equal($('#elm1').html(), '<p>Editor 1</p>\n<p>Test 1</p>'); $('#elm1').prepend('<p>Test 2</p>'); LegacyUnit.equal($('#elm1').html(), '<p>Test 2</p>\n<p>Editor 1</p>\n<p>Test 1</p>'); }); suite.test("Find using :tinymce selector", function () { LegacyUnit.equal($('textarea:tinymce').length, 2); }); suite.test("Set contents using :tinymce selector", function () { $('textarea:tinymce').val('Test 1'); LegacyUnit.equal($('#elm1').val(), '<p>Test 1</p>'); LegacyUnit.equal($('#elm2').val(), '<p>Test 1</p>'); LegacyUnit.equal($('#elm3').val(), 'Textarea'); }); suite.test("Get contents using :tinymce selector", function () { $('textarea:tinymce').val('Test get'); LegacyUnit.equal($('textarea:tinymce').val(), '<p>Test get</p>'); }); suite.test("applyPatch is only called once", function () { var options = {}, oldValFn; $('#elm1').tinymce(options); oldValFn = $.fn.val = function () { // no-op }; $('#elm2').tinymce(options); LegacyUnit.equal($.fn.val, oldValFn); }); loadJquery(function () { setup(); Pipeline.async({}, suite.toSteps({}), function () { EditorManager.remove(); viewBlock.detach(); success(); }, failure); }); });