Remove undo/redo formatting toolbar buttons

There have been long standing problems with the buttons not working in
Firefox, and now a [further
problem](https://groups.google.com/d/msg/tiddlywiki/GlsruQyPOag/BAhnI2mt
BgAJ) has come to light, and been similarly hard to resolve.

On balance, I’ve decided to remove the undo/redo buttons from the
toolbar (the ctrl/cmd-Z shortcut is still operational), thus avoiding
the problems, and saving some space in the core.
This commit is contained in:
Jermolene
2016-05-01 13:51:45 +01:00
parent 727b7b1ed0
commit 72fb1e22ed
17 changed files with 2 additions and 162 deletions
-25
View File
@@ -196,31 +196,6 @@ FramedEngine.prototype.executeTextOperation = function(operation) {
return newText;
};
/*
Execute a command
*/
FramedEngine.prototype.execCommand = function(command) {
var msg = "Warning: the '" + command + "' button does not work in Firefox without installing the CodeMirror plugin.\n\n(Standard operating system keyboard shortcuts will work correctly)";
this.iframeNode.focus();
this.domNode.focus();
switch(command) {
case "undo":
if($tw.browser.isFirefox) {
alert(msg);
} else {
this.iframeDoc.execCommand("undo",false,null);
}
break;
case "redo":
if($tw.browser.isFirefox) {
alert(msg);
} else {
this.iframeDoc.execCommand("redo",false,null);
}
break;
}
};
exports.FramedEngine = FramedEngine;
})();
@@ -1,19 +0,0 @@
/*\
title: $:/core/modules/editor/operations/text/redo.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to tell the browser to perform an redo
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["redo"] = function(event,operation) {
this.execCommand("redo");
};
})();
@@ -1,19 +0,0 @@
/*\
title: $:/core/modules/editor/operations/text/undo.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to tell the browser to perform an undo
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["undo"] = function(event,operation) {
this.execCommand("undo");
};
})();