简体   繁体   中英

VScode editor .xml file extension to show html file inside editor

I'm new to vscode editor, I need below functionality to extended vscode editor.

How to render and display html file inside a vscode editor depending on file extension type.

Suppose following is the folder structure.

> MyProject[folder]
   > src[folder]
   > lib[folder]
   > package.json[file]
   > config.xml[file]

When user clicks on config.xml file I want to open an index.html file inside vscode editor(may be in preview window or any other option). Html file should be displayed as how it displays in browser inside vscode not as how editor displays as an editing html file.

Refer to this: https://code.visualstudio.com/api/extension-guides/custom-editors You can completely customize the editor you want, combined with html+css to display files in any format. The specific display method of the file needs to be written by yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM