使用 JavaScript 控制台
粘贴后,您可以使用浏览器的 javascript 控制台来编辑文本区域。
使用谷歌浏览器(或 Firefox)
将文本粘贴到文本区域。
右键单击文本区域,然后单击Inspect Element

查看元素的id

现在切换到控制台视图

然后运行这些行(确保'the-id'
用您的 id 替换)
var my_text_area = document.getElementById('the-id'); // Put your id in here
my_text_area.value = my_text_area.value.replace(/ /g,"") // Deletes just spaces
如果您可以访问 jQuery,那就更简单了:
$('#the-id').val($('#the-id').val().replace(/ /g, ""))
该replace
函数只是使用正则表达式将空格转换为空。如果要替换所有空格(包括换行符),您将使用.replace(/\s/g,"")
.
对于 Firefox,名称相同,但 UI 略有不同。

您可以编写一个greasemonkey 插件,也可以尝试找到一个适合您需要的插件。