MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / getListHtml

Function getListHtml

src/session.ts:578–649  ·  view source on GitHub ↗
(webview: Webview, file: string)

Source from the content-addressed store, hash-verified

576}
577
578export async function getListHtml(webview: Webview, file: string): Promise<string> {
579 resDir = isGuestSession ? guestResDir : resDir;
580 const content = await readContent(file, 'utf8');
581
582 return `
583<!doctype HTML>
584<html>
585<head>
586 <meta charset="utf-8" />
587 <meta name="viewport" content="width=device-width, initial-scale=1">
588 <script src="${String(webview.asWebviewUri(Uri.file(path.join(resDir, 'jquery.min.js'))))}"></script>
589 <script src="${String(webview.asWebviewUri(Uri.file(path.join(resDir, 'jquery.json-viewer.js'))))}"></script>
590 <link href="${String(webview.asWebviewUri(Uri.file(path.join(resDir, 'jquery.json-viewer.css'))))}" rel="stylesheet">
591 <style type="text/css">
592 body {
593 color: var(--vscode-editor-foreground);
594 background-color: var(--vscode-editor-background);
595 }
596
597 .json-document {
598 padding: 0 0;
599 }
600
601 pre#json-renderer {
602 font-family: var(--vscode-editor-font-family);
603 border: 0;
604 }
605
606 ul.json-dict, ol.json-array {
607 color: var(--vscode-symbolIcon-fieldForeground);
608 border-left: 1px dotted var(--vscode-editorLineNumber-foreground);
609 }
610
611 .json-literal {
612 color: var(--vscode-symbolIcon-variableForeground);
613 }
614
615 .json-string {
616 color: var(--vscode-symbolIcon-stringForeground);
617 }
618
619 a.json-toggle:before {
620 color: var(--vscode-button-secondaryBackground);
621 }
622
623 a.json-toggle:hover:before {
624 color: var(--vscode-button-secondaryHoverBackground);
625 }
626
627 a.json-placeholder {
628 color: var(--vscode-input-placeholderForeground);
629 }
630 </style>
631 <script>
632 var data = ${String(content)};
633 $(document).ready(function() {
634 var options = {
635 collapsed: false,

Callers 1

showDataViewFunction · 0.85

Calls 1

readContentFunction · 0.90

Tested by

no test coverage detected