I'm trying to capture selected text in a chrome extension and put it in a Google Doc, however whenever I try to run the script with the packaged extension I get the following errors.
The given range does not belong to the current selection's document.
Blocked script execution in 'https://docs.google.com/document/d/1E23-KSMXgymTVpYVtimQHw26yrqAVYlNHUb59zcPleU/edit' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
Any info on how to fix these issues would be amazing.