mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-07 11:16:55 +00:00
Set "text/plain" data only when it exists
This commit is contained in:
parent
79c326b1c1
commit
939a2079b6
@ -289,7 +289,9 @@ exports.copyToClipboard = function(text,options,type) {
|
||||
textArea.setSelectionRange(0,text.length);
|
||||
textArea.addEventListener("copy",function(event) {
|
||||
event.preventDefault();
|
||||
event.clipboardData.setData("text/plain",options.plainText);
|
||||
if (options.plainText) {
|
||||
event.clipboardData.setData("text/plain",options.plainText);
|
||||
}
|
||||
event.clipboardData.setData(type,text);
|
||||
});
|
||||
var succeeded = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user