Markdown/HTML Preview: I can open links within VS Code (fixes #2362)
This commit is contained in:
parent
dc22667402
commit
f8ad5c52ae
2 changed files with 12 additions and 3 deletions
|
@ -197,7 +197,11 @@ export class IFrameEditor extends BaseEditor {
|
|||
'window.document.body.addEventListener("drop", function (e) {',
|
||||
' e.preventDefault();',
|
||||
'});',
|
||||
'</script>'
|
||||
|
||||
// disable navigating to some URL!
|
||||
'window.onbeforeunload = function () {',
|
||||
' return false;',
|
||||
'};'
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
|
@ -210,7 +214,7 @@ export class IFrameEditor extends BaseEditor {
|
|||
}
|
||||
|
||||
private clearIFrame(): void {
|
||||
this.iframeBuilder.src('about:blank');
|
||||
this.setFrameContents(null, '', true);
|
||||
this.iframeBuilder.removeProperty(IFrameEditor.RESOURCE_PROPERTY);
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,12 @@ namespace Integration {
|
|||
'});',
|
||||
'window.document.body.addEventListener("drop", function (e) {',
|
||||
' e.preventDefault();',
|
||||
'});'
|
||||
'});',
|
||||
|
||||
// disable navigating to some URL!
|
||||
'window.onbeforeunload = function () {',
|
||||
' return false;',
|
||||
'};'
|
||||
];
|
||||
|
||||
export function defaultHtml() {
|
||||
|
|
Loading…
Reference in a new issue