vscode-map-preview icon indicating copy to clipboard operation
vscode-map-preview copied to clipboard

See if we can request and load preview content instead of embedding it directly to the preview map HTML

Open jumpinjackie opened this issue 9 years ago • 1 comments
trafficstars

Currently the raw text buffer of the active document is embedded into the HTML for making the preview map. I'm expecting a whole class of problems with this approach due to various characters in the active document that would need proper escaping before being embedded.

Instead, we should see if we can leverage this virtual document API to provide a second custom URI for the actual document content and see if we can use fetch() to retrieve said content (assuming it can support whatever custom URI schemes registered by VSCode)

jumpinjackie avatar Jun 07 '16 09:06 jumpinjackie

This looks very unlikely, it seems that fetch() doesn't like the custom URI schemes I register with VSCode. I doubt raw XHR would be any better.

jumpinjackie avatar Jun 08 '16 13:06 jumpinjackie