copy_and_paste: Re-disable copy-paste handler in production.

This reverts commit 6e048c5d3f.

See #8963 for the main issue we need to fix before re-enabling this;
basically, some combination of toMarkdown and the way text/html gets
written was introducing a lot of bonus/bogus whitespace, both in the
form of newlines and spaces converted to ` `.
This commit is contained in:
Tim Abbott 2018-04-09 22:08:26 -07:00
parent a183186672
commit a4def8d409
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
global.stub_out_jquery();
set_global('page_params', {
development: true,
});
var jsdom = require("jsdom");
global.document = jsdom.jsdom('<!DOCTYPE html><p>Hello world</p>');
var window = jsdom.jsdom().defaultView;

View File

@ -224,7 +224,7 @@ exports.paste_handler = function (event) {
if (clipboardData.getData) {
var paste_html = clipboardData.getData('text/html');
if (paste_html) {
if (paste_html && page_params.development_environment) {
event.preventDefault();
var text = exports.paste_handler_converter(paste_html);
compose_ui.insert_syntax_and_focus(text);