最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - How to place a VSCode plugin's webview in the bottom panel - Stack Overflow

programmeradmin2浏览0评论

I am developing a VSCode plugin and want to display a webview content in the bottom panel (the one where the terminal is located), but I have reviewed VSCode's API and there is no item in the ViewColumn enumeration that can control the display in the bottom panel. Does anyone know how to display it in that position? Thank you very much.

enter image description here enter image description here I ask AI,he told me to set ViewColumn.Panel,but there is not this item.

I am developing a VSCode plugin and want to display a webview content in the bottom panel (the one where the terminal is located), but I have reviewed VSCode's API and there is no item in the ViewColumn enumeration that can control the display in the bottom panel. Does anyone know how to display it in that position? Thank you very much.

enter image description here enter image description here I ask AI,he told me to set ViewColumn.Panel,but there is not this item.

Share Improve this question asked Nov 21, 2024 at 2:46 李致知李致知 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

You have to contribute your viewContainer to panel, instead of activityBar, like the example below:

    "contributes": {
        "viewsContainers": {
            "panel": [
                {
                    "id": "project-manager",
                    "title": "%projectManager.activitybar.title%",
                    "icon": "images/project-manager-side-bar.svg"
                }
            ]
        },
        "views": {
            "project-manager": [
                {
                    "id": "projectsExplorerFavorites",
                    "name": "%projectManager.views.favorites.name%"
                },

The documentation here (https://code.visualstudio/api/references/contribution-points#contributes.viewsContainers) defines this behavior:

At present, you can contribute them to the Activity Bar (activitybar) and Panel (panel).

发布评论

评论列表(0)

  1. 暂无评论