Reputation: 25
I am working on a visual studio code extension. This is basically a language extension. I have implemented syntax highlighting for a language that is developed in our organization. This extension gets activated on ".br" file format. When .br file is opened, syntax highlighting is applied to that file.
Now, I also want to give support to one more file extension. That file extension is ".rqtf". But, I don't want to give syntax highlighting support for this file. When this file is opened in VSCode, extension should create an image and show it in VSCode window. Actual content of ".rqtf" file is textual. I want to create an image based on that information.
For example, the content of the ".rqtf" file is:
And output image file from this content should be like:
If this is not possible in my existing extension, then I can create separate extension for that. However, I just want to know that: Is this conversion of text information to image is possible in vscode extension?
Thank you in advance.
Upvotes: 0
Views: 2322
Reputation: 67591
There's webview api that allowes you to render html:
https://code.visualstudio.com/api/extension-guides/webview
If you want to render images in the text file itself there's something not yet released "Code Insets":
https://github.com/Microsoft/vscode/pull/66418
Upvotes: 2