59 lines
1.8 KiB
HTML
59 lines
1.8 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('Plugin Dependency Loaded from a Specific location', function() {
|
|
expect(2);
|
|
check_plugin_loaded("specific_location");
|
|
check_plugin_loaded("autolink");
|
|
});
|
|
|
|
tinymce.create('tinymce.plugins.SpecificLocation', {});
|
|
|
|
// Register plugin
|
|
tinymce.PluginManager.add('specific_location', tinymce.plugins.SpecificLocation, [{prefix: "plugins/", resource:"autolink", suffix:'/plugin' + tinymce.suffix + '.js'}]);
|
|
|
|
tinymce.init({
|
|
mode : "exact",
|
|
elements : "elm1",
|
|
add_unload_trigger : false,
|
|
plugins: "-specific_location",
|
|
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>
|