Skip to content

Commit

Permalink
Action_Paste postMessage to work around the pasting mechanism.
Browse files Browse the repository at this point in the history
In some cases, the integration needs to paste the data directly to the
document, outside of our mechanism that detects whether we should use
the internal paste, or not.

Change-Id: I5e5de09a990ed68451af34dd208a81391a0e9cfa
Signed-off-by: Mert Tumer <[email protected]>
  • Loading branch information
kendy authored and mmeeks committed Sep 16, 2021
1 parent 0171677 commit 7b6474f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions loleaflet/src/map/handler/Map.WOPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,12 @@ L.Map.WOPI = L.Handler.extend({
this._map.insertURL(msg.Values.url);
}
}
else if (msg.MessageId == 'Action_Paste') {
if (msg.Values && msg.Values.Mimetype && msg.Values.Data) {
var blob = new Blob(['paste mimetype=' + msg.Values.Mimetype + '\n', msg.Values.Data]);
app.socket.sendMessage(blob);
}
}
else if (msg.MessageId === 'Action_ShowBusy') {
if (msg.Values && msg.Values.Label) {
this._map.fire('showbusy', {label: msg.Values.Label});
Expand Down

0 comments on commit 7b6474f

Please sign in to comment.