forked from tinymce/tinymce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin_dependency_simple.html
55 lines (52 loc) · 1.86 KB
/
plugin_dependency_simple.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Basic editor functionality tests</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" type="text/css" />
<script src="http://code.jquery.com/qunit/qunit-git.js"></script>
<script src="qunit/connector.js"></script>
<script type="text/javascript" src="qunit/runner.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/tiny_mce_loader.js"></script>
<script type="text/javascript">
QUnit.config.reorder = false;
QUnit.config.autostart = false;
test('PluginDependencyIsLoaded', function() {
expect(2);
var pluginManager = tinyMCE.PluginManager;
var depPlugin = pluginManager.get("example_dependency");
ok(depPlugin, "Example Dependent plugin should have loaded");
var examplePlugin = pluginManager.get("example");
ok(examplePlugin, "Example plugin should have loaded via dependencies");
});
tinyMCE.init({
mode : "exact",
elements : "elm1",
add_unload_trigger : false,
plugins: "example_dependency",
init_instance_callback : function(ed) {
editor = ed;
ed.onNodeChange.addToTop(function() {
return false;
});
QUnit.start();
}
});
</script>
</head>
<body>
<h1 id="qunit-header">Plugin Dependency Functional tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="content">
<textarea id="elm1" name="elm1"></textarea>
<div>
<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent({format : 'raw'}));">[getRawContents]</a>
<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent());">[getContents]</a>
</div>
</div>
</body>
</html>