日本語版(外部サイト) / Japanese version(external site)
CodeToHTML is a Visual Studio Code extension that allows you to convert source code to HTML, PDF and images with syntax highlighting.
Visual Studio Code Marketplace
- Open Visual Studio Code
- Press
Ctrl + Shift + Xto open the Extensions view - Find and select
CodeToHTML - Click the
Installbutton
- Convert source code to HTML
- Convert source code to PDF with selectable text
- Convert source code to images (PNG, JPEG, SVG)
For example, you can convert the following JavaScript code to HTML.
- Open the source code file you want to convert
- Open the command palette by pressing
Ctrl + Shift + P - Type
CodeToHTMLand select[CodeToHTML] Code to HTML - The Webview will open with the HTML code
- Select Code To
HTML - From
Structureselect the structure of the HTML - From
Text Wrapselect the text wrapping of the HTML - From
Max Lengthselect the maximum length of text wrapping
- Select Code To
PDF - From
Font(.ttf)select the font file (optional) - From
Text Wrapselect the text wrapping of the PDF - From
Max Lengthselect the maximum length of text wrapping
- Select Code To
Image - From
Image Typeselect the image type (PNG, JPEG, SVG) - From
Text Wrapselect the text wrapping of the image - From
Max Lengthselect the maximum length of text wrapping
Initial release of CodeToHTML
This extension is licensed under the MIT License.
- jsPDF - MIT License
- dom-to-image-more - MIT License




