/js/tiny_mce/plugins/print/editor_plugin_src.js

https://bitbucket.org/exodusmedia/exoui · JavaScript · 34 lines · 20 code · 4 blank · 10 comment · 0 complexity · 076722d31a5b000bac61bceaed6e5a66 MD5 · raw file

  1. /**
  2. * editor_plugin_src.js
  3. *
  4. * Copyright 2009, Moxiecode Systems AB
  5. * Released under LGPL License.
  6. *
  7. * License: http://tinymce.moxiecode.com/license
  8. * Contributing: http://tinymce.moxiecode.com/contributing
  9. */
  10. (function() {
  11. tinymce.create('tinymce.plugins.Print', {
  12. init : function(ed, url) {
  13. ed.addCommand('mcePrint', function() {
  14. ed.getWin().print();
  15. });
  16. ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'});
  17. },
  18. getInfo : function() {
  19. return {
  20. longname : 'Print',
  21. author : 'Moxiecode Systems AB',
  22. authorurl : 'http://tinymce.moxiecode.com',
  23. infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',
  24. version : tinymce.majorVersion + "." + tinymce.minorVersion
  25. };
  26. }
  27. });
  28. // Register plugin
  29. tinymce.PluginManager.add('print', tinymce.plugins.Print);
  30. })();