From f6cb3749f55117734c86375c306f08d87df86d3f Mon Sep 17 00:00:00 2001 From: GoshaZotov Date: Thu, 19 Feb 2026 20:41:33 +0300 Subject: [PATCH] [se] Fix bug 80235 --- cell/api.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/cell/api.js b/cell/api.js index f4a45041b4..974e8b0207 100644 --- a/cell/api.js +++ b/cell/api.js @@ -492,13 +492,30 @@ var editor; } }; - spreadsheet_api.prototype.asc_TextImport = function(options, callback, bPaste) { + spreadsheet_api.prototype.asc_TextImport = function(options, callback, bPaste, isPasteOptions) { //return this.asc_TextFromUrl(null, options, callback); //return this.asc_TextFromFile(options, callback); if (this.canEdit()) { var text; if(bPaste) { - text = AscCommon.g_specialPasteHelper.GetPastedData(true); + if (isPasteOptions) { + AscCommon.g_clipboardBase.Get_Clipboard_Data(function (data) { + if (!data) { + callback(""); + return; + } + //onpaste + if (data.clipboardData) { + callback(""); + } else { + let _text = data[AscCommon.c_oAscClipboardDataFormat.Text]; + callback(_text ? _text : ""); + } + }); + return; + } else { + text = AscCommon.g_specialPasteHelper.GetPastedData(true); + } } else { var ws = this.wb.getWorksheet(); text = ws.getRangeText(); @@ -507,7 +524,7 @@ var editor; //error //no data was selected to parse this.sendEvent('asc_onError', c_oAscError.ID.NoDataToParse, c_oAscError.Level.NoCritical); - callback(false); + callback(""); return; } callback(text);