diff --git a/src/HTMLDocumentContentProvider.ts b/src/HTMLDocumentContentProvider.ts index c0c134e..b3fd2f9 100644 --- a/src/HTMLDocumentContentProvider.ts +++ b/src/HTMLDocumentContentProvider.ts @@ -21,7 +21,7 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC css:string jsonRendererScript: string; errorContainer = '' - userVarContainer = `
`; + jsonRendererCode = `
`; printContainer = `
Print Output:
`; timeContainer = `

`; settings:vscode.WorkspaceConfiguration; @@ -51,9 +51,19 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC } public updateContent(){ + // todo: handle different themes. check body class: https://code.visualstudio.com/updates/June_2016 - this.html = this.css + this.jsonRendererScript + this.errorContainer + - this.userVarContainer + this.printContainer + this.timeContainer; + this.html = ` + ${this.css} + ${this.jsonRendererScript} + ${this.jsonRendererCode} + + + ${this.errorContainer} +
+ ${this.printContainer} + ${this.timeContainer} + ` // issue #1: need to make sure html is new each time or wierd crap happens this.html += `` @@ -88,15 +98,15 @@ export default class HtmlDocumentContentProvider implements vscode.TextDocumentC // escape end script tag or else the content will escape its container and WREAK HAVOC userVarsCode = userVarsCode.replace(/<\/script>/g,'<\\/script>') - let jsonRendererCode = `` - - this.userVarContainer = `
${jsonRendererCode}
` + this.jsonRendererCode = `` } private updateTime(time:number){