mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 21:11:38 +01:00
@@ -34,14 +34,14 @@ export class MarkdownPreview {
|
||||
private isScrolling = false;
|
||||
private _disposed: boolean = false;
|
||||
|
||||
|
||||
public static async revive(
|
||||
webview: vscode.WebviewPanel,
|
||||
state: any,
|
||||
contentProvider: MarkdownContentProvider,
|
||||
previewConfigurations: MarkdownPreviewConfigurationManager,
|
||||
logger: Logger,
|
||||
topmostLineMonitor: MarkdownFileTopmostLineMonitor
|
||||
topmostLineMonitor: MarkdownFileTopmostLineMonitor,
|
||||
contributions: MarkdownContributions,
|
||||
): Promise<MarkdownPreview> {
|
||||
const resource = vscode.Uri.parse(state.resource);
|
||||
const locked = state.locked;
|
||||
@@ -56,6 +56,12 @@ export class MarkdownPreview {
|
||||
logger,
|
||||
topmostLineMonitor);
|
||||
|
||||
preview.editor.webview.options = {
|
||||
enableScripts: true,
|
||||
enableCommandUris: true,
|
||||
localResourceRoots: MarkdownPreview.getLocalResourceRoots(resource, contributions)
|
||||
};
|
||||
|
||||
if (!isNaN(line)) {
|
||||
preview.line = line;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,8 @@ export class MarkdownPreviewManager implements vscode.WebviewPanelSerializer {
|
||||
this._contentProvider,
|
||||
this._previewConfigurations,
|
||||
this._logger,
|
||||
this._topmostLineMonitor);
|
||||
this._topmostLineMonitor,
|
||||
this._contributions);
|
||||
|
||||
this.registerPreview(preview);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user