Overview
CodeToHTML is a Visual Studio Code extension that allows you to convert source code to HTML, PDF and images with syntax highlighting.
Installation
Visual Studio Code Marketplace
- Open Visual Studio Code
- Press
Ctrl + Shift + X to open the Extensions view
- Find and select
CodeToHTML
- Click the
Install button
Features
- Convert source code to HTML
- Convert source code to PDF with selectable text
- Convert source code to images (PNG, JPEG, SVG)
Example
For example, you can convert the following JavaScript code to HTML.
Original JavaScript code
Converted HTML code
Usage
- Open the source code file you want to convert
- Open the command palette by pressing
Ctrl + Shift + P
- Type
CodeToHTML and select [CodeToHTML] Code to HTML
- The Webview will open with the HTML code
Convert to HTML
- Select Code To
HTML
- From
Structure select the structure of the HTML
- From
Text Wrap select the text wrapping of the HTML
- From
Max Length select the maximum length of text wrapping
Convert to PDF
- Select Code To
PDF
- From
Font(.ttf) select the font file (optional)
- From
Text Wrap select the text wrapping of the PDF
- From
Max Length select the maximum length of text wrapping
Convert to Image
- Select Code To
Image
- From
Image Type select the image type (PNG, JPEG, SVG)
- From
Text Wrap select the text wrapping of the image
- From
Max Length select the maximum length of text wrapping
Release Notes
1.0.0
Initial release of CodeToHTML
License
This extension is licensed under the MIT License.
Credits
| |