Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Document Types to Webview #7626

Closed
cbreeden opened this issue Jun 13, 2016 · 3 comments
Closed

Add Document Types to Webview #7626

cbreeden opened this issue Jun 13, 2016 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@cbreeden
Copy link

  • VSCode Version: 1.2.0
  • OS Version: Linux

When providing html to vscode.previewHtml the doctype is stripped here in the webview.html. This can prevent some styles from not working properly, such as KaTeX which can cause problems like this here. I was working on a plugin that would allow me to render Markdown and KaTeX in previewHtml when I ran into this issue.

I simply wanted to replace the linked code above with

target.contentDocument.write('<!DOCTYPE html>' + newDocument.documentElement.innerHTML);

This does fix the problem for me. But I had issues following the contribution guidelines (probably another issue), and there probably is a better way to handle this.

@sandy081
Copy link
Member

Looks like this and #7628 are same. Hence closing this as duplicates #7628

@sandy081 sandy081 added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 14, 2016
@cbreeden
Copy link
Author

@sandy081 not quite. #7628 was a pull request to fix this issue, which we decided to defer since #7656 would fix the issue and was almost ready for prime time. So while this issue is still valid, it shouldn't be soon and probably can be closed.

@jrieken jrieken added this to the June 2016 milestone Jun 15, 2016
@jrieken
Copy link
Member

jrieken commented Jun 15, 2016

We will merge the PR very soon.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants