institucional-brasil/assets/libs/tinymce/tests/plugins/plugin_dependency_chain.html

60 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<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="js/qunit/reporter.js"></script>
<script src="js/utils.js"></script>
<script src="js/tinymce_loader.js"></script>
<script>
QUnit.config.reorder = false;
QUnit.config.autostart = false;
function check_plugin_loaded(name){
var pluginManager = tinymce.PluginManager;
var depPlugin = pluginManager.get(name);
ok(depPlugin, name + " plugin should have loaded");
}
test('Dependency Chain Legacy style test', function() {
expect(3);
check_plugin_loaded("example");
check_plugin_loaded("example_dependency");
check_plugin_loaded("depend_chain");
});
tinymce.create('tinymce.plugins.DependencyChain', {});
// Register plugin
tinymce.PluginManager.add('depend_chain', tinymce.plugins.DependencyChain, ["example_dependency"]);
tinymce.init({
mode : "exact",
elements : "elm1",
add_unload_trigger : false,
plugins: "depend_chain",
init_instance_callback : function(ed) {
editor = ed;
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>