Last active
October 14, 2020 18:04
-
-
Save ljmotta/1cbf4bdcb4628fe73b2ee0c3953c756e to your computer and use it in GitHub Desktop.
TodoListWebview HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public open(pageId: string, opts: { onClose: () => void }) { | |
// ... | |
const scriptSrc = webviewPanel.webview | |
.asWebviewUri(Uri.file(this.context.asAbsolutePath(this.envelopeLocator.envelopePath))) | |
.toString(); | |
webviewPanel.webview.html = `<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<style> | |
html, body, div#envelope-app { | |
margin: 0; | |
border: 0; | |
padding: 10px; | |
} | |
</style> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<div id="envelope-app" /> | |
<script src="${scriptSrc}"></script> | |
</body> | |
</html>`; | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment