mirror of
https://github.com/discourse/discourse.git
synced 2025-03-31 16:35:54 +08:00
HACK: disable undo/redo editor functionality
TODO in a few weeks, rip out all code.
This commit is contained in:
parent
d65efe7304
commit
6f88fc3aa3
@ -156,7 +156,7 @@
|
|||||||
var previewManager = new PreviewManager(markdownConverter, panels, function () { hooks.onPreviewRefresh(); });
|
var previewManager = new PreviewManager(markdownConverter, panels, function () { hooks.onPreviewRefresh(); });
|
||||||
var undoManager, uiManager;
|
var undoManager, uiManager;
|
||||||
|
|
||||||
if (!/\?noundo/.test(doc.location.href)) {
|
if (false && !/\?noundo/.test(doc.location.href)) {
|
||||||
undoManager = new UndoManager(function () {
|
undoManager = new UndoManager(function () {
|
||||||
previewManager.refresh();
|
previewManager.refresh();
|
||||||
if (uiManager) // not available on the first call
|
if (uiManager) // not available on the first call
|
||||||
@ -1587,16 +1587,16 @@
|
|||||||
}));
|
}));
|
||||||
buttons.heading = makeButton("wmd-heading-button", getString("heading"), bindCommand("doHeading"));
|
buttons.heading = makeButton("wmd-heading-button", getString("heading"), bindCommand("doHeading"));
|
||||||
buttons.hr = makeButton("wmd-hr-button", getString("hr"), bindCommand("doHorizontalRule"));
|
buttons.hr = makeButton("wmd-hr-button", getString("hr"), bindCommand("doHorizontalRule"));
|
||||||
makeSpacer(3);
|
//makeSpacer(3);
|
||||||
buttons.undo = makeButton("wmd-undo-button", getString("undo"), null);
|
//buttons.undo = makeButton("wmd-undo-button", getString("undo"), null);
|
||||||
buttons.undo.execute = function (manager) { if (manager) manager.undo(); };
|
//buttons.undo.execute = function (manager) { if (manager) manager.undo(); };
|
||||||
|
|
||||||
var redoTitle = /win/.test(nav.platform.toLowerCase()) ?
|
// var redoTitle = /win/.test(nav.platform.toLowerCase()) ?
|
||||||
getString("redo") :
|
// getString("redo") :
|
||||||
getString("redomac"); // mac and other non-Windows platforms
|
// getString("redomac"); // mac and other non-Windows platforms
|
||||||
|
|
||||||
buttons.redo = makeButton("wmd-redo-button", redoTitle, null);
|
//buttons.redo = makeButton("wmd-redo-button", redoTitle, null);
|
||||||
buttons.redo.execute = function (manager) { if (manager) manager.redo(); };
|
//buttons.redo.execute = function (manager) { if (manager) manager.redo(); };
|
||||||
|
|
||||||
if (helpOptions) {
|
if (helpOptions) {
|
||||||
var helpButton = document.createElement("li");
|
var helpButton = document.createElement("li");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user