plugin.js 600 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * plugin.js
  3. *
  4. * Copyright, Moxiecode Systems AB
  5. * Released under LGPL License.
  6. *
  7. * License: http://www.tinymce.com/license
  8. * Contributing: http://www.tinymce.com/contributing
  9. */
  10. /*global tinymce:true */
  11. tinymce.PluginManager.add('print', function(editor) {
  12. editor.addCommand('mcePrint', function() {
  13. editor.getWin().print();
  14. });
  15. editor.addButton('print', {
  16. title: 'Print',
  17. cmd: 'mcePrint'
  18. });
  19. editor.addShortcut('Ctrl+P', '', 'mcePrint');
  20. editor.addMenuItem('print', {
  21. text: 'Print',
  22. cmd: 'mcePrint',
  23. icon: 'print',
  24. shortcut: 'Ctrl+P',
  25. context: 'file'
  26. });
  27. });