File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/o-spreadsheet-engine/src/plugins/ui_stateful Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -520,9 +520,19 @@ export class ClipboardPlugin extends UIPlugin {
520520 const file = await this . getImageContent ( ) ;
521521 const mime = file ?. type ;
522522 const content : OSClipboardContent = {
523- [ ClipboardMIMEType . PlainText ] : this . getPlainTextContent ( ) ,
524- [ ClipboardMIMEType . Html ] : await this . getHTMLContent ( ) ,
523+ [ ClipboardMIMEType . PlainText ] : "" ,
524+ [ ClipboardMIMEType . Html ] : "" ,
525525 } ;
526+ try {
527+ content [ ClipboardMIMEType . PlainText ] = this . getPlainTextContent ( ) ;
528+ content [ ClipboardMIMEType . Html ] = await this . getHTMLContent ( ) ;
529+ } catch ( error ) {
530+ this . ui . notifyUI ( {
531+ type : "danger" ,
532+ text : "Your selection was too large for the browser to copy it.\nPlease select a smaller zone." ,
533+ sticky : true ,
534+ } ) ;
535+ }
526536 if ( mime && file ) {
527537 content [ mime ] = file ;
528538 }
You can’t perform that action at this time.
0 commit comments