plugin.js 718 B

123456789101112131415161718192021222324252627282930
  1. module( 'core.plugin' );
  2. test( 'register', function() {
  3. UE.plugin.register('test',function(){
  4. this.testplugin = true;
  5. });
  6. $('<div id="ue"></div>').appendTo(document.body);
  7. var editor = UE.getEditor('ue');
  8. stop();
  9. editor.ready(function () {
  10. ok(this.testplugin);
  11. editor.destroy();
  12. $('#ue').remove()
  13. start();
  14. });
  15. });
  16. test( 'load', function() {
  17. UE.plugin.register('test',function(){
  18. this.testplugin = true;
  19. });
  20. $('<div id="ue"></div>').appendTo(document.body);
  21. var editor = UE.getEditor('ue',{
  22. test:false
  23. });
  24. stop();
  25. editor.ready(function () {
  26. // ok(!this.testplugin); todo
  27. start();
  28. });
  29. });