visual studio code - how to refresh images in HTML Preview? -
i showing html preview containing image in vscode.
if html content supposed change, call update method of textdocumentcontentprovider. result in html preview see updated text, image still old one, though changed image file in meantime. when closing preview , reopening new image displayed.
how can force html preview reload images?
update code:
provider = new heapprovider(); //heapprovider extends textdocumentcontentprovider previewuri:string; method updatepreview(){ this.provider.update(this.previewuri) vscode.commands.executecommand('vscode.previewhtml', this.previewuri, vscode.viewcolumn.two).then((success) => { }, (reason) => { vscode.window.showerrormessage(reason); }); }
Comments
Post a Comment