2013-07-25 23:50:43 +02:00
|
|
|
/**
|
|
|
|
* plugin.js
|
|
|
|
*
|
|
|
|
* Copyright, Moxiecode Systems AB
|
|
|
|
* Released under LGPL License.
|
|
|
|
*
|
|
|
|
* License: http://www.tinymce.com/license
|
|
|
|
* Contributing: http://www.tinymce.com/contributing
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*global tinymce:true */
|
|
|
|
|
2013-07-30 13:04:00 +02:00
|
|
|
tinymce.PluginManager.add('print', function(editor) {
|
2013-07-25 23:50:43 +02:00
|
|
|
editor.addCommand('mcePrint', function() {
|
|
|
|
editor.getWin().print();
|
|
|
|
});
|
|
|
|
|
2013-07-30 13:04:00 +02:00
|
|
|
editor.addButton('print', {
|
|
|
|
title: 'Print',
|
|
|
|
cmd: 'mcePrint'
|
|
|
|
});
|
|
|
|
|
|
|
|
editor.addShortcut('Ctrl+P', '', 'mcePrint');
|
2013-07-25 23:50:43 +02:00
|
|
|
|
|
|
|
editor.addMenuItem('print', {
|
|
|
|
text: 'Print',
|
|
|
|
cmd: 'mcePrint',
|
|
|
|
icon: 'print',
|
|
|
|
shortcut: 'Ctrl+P',
|
|
|
|
context: 'file'
|
|
|
|
});
|
|
|
|
});
|