mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ef10672364
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92488 467b73ca-7a2a-4603-9d3b-597d59a354a9
25 lines
651 B
JavaScript
25 lines
651 B
JavaScript
/**
|
|
* $Id: EditorCommands.js 1042 2009-03-04 16:00:50Z spocke $
|
|
*
|
|
* @author Moxiecode
|
|
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
|
*/
|
|
|
|
(function(tinymce) {
|
|
tinymce.each(['Cut', 'Copy', 'Paste'], function(cmd) {
|
|
tinymce.GlobalCommands.add(cmd, function() {
|
|
var ed = this, doc = ed.getDoc();
|
|
|
|
try {
|
|
doc.execCommand(cmd, false, null);
|
|
|
|
// On WebKit the command will just be ignored if it's not enabled
|
|
if (!doc.queryCommandSupported(cmd))
|
|
throw 'Error';
|
|
} catch (ex) {
|
|
ed.windowManager.alert(ed.getLang('clipboard_no_support'));
|
|
}
|
|
});
|
|
});
|
|
})(tinymce);
|