Closed brunochatenoux closed 2 years ago
You can use the following setting to add a button changing a cell to raw:
{
"leftMenu": [
// ... other commands
{
"command": "notebook:change-cell-to-raw",
// You may find a better icon
"icon": "ui-components:table-rows",
}
]
}
Thanks @fcollonval for your quick answer. I am using the following setting to jump between markdown-code-raw. Not sure it is the most efficient way to do it but it works.
"leftMenu": [
{
"cellType": "markdown",
"command": "notebook:change-cell-to-code",
"icon": "@jlab-enhanced/cell-toolbar:code"
},
{
"cellType": "raw",
"command": "notebook:change-cell-to-code",
"icon": "@jlab-enhanced/cell-toolbar:code"
},
{
"cellType": "code",
"command": "notebook:change-cell-to-markdown",
"icon": "ui-components:markdown"
},
{
"cellType": "raw",
"command": "notebook:change-cell-to-markdown",
"icon": "ui-components:markdown"
},
{
"cellType": "markdown",
"command": "notebook:change-cell-to-raw",
"icon": "ui-components:text-editor",
},
{
"cellType": "code",
"command": "notebook:change-cell-to-raw",
"icon": "ui-components:text-editor",
},
{
"cellType": "code",
"command": "jupyterlab_code_formatter:format",
"icon": "@jlab-enhanced/cell-toolbar:format",
"tooltip": "Format Cell"
},
{
"command": "notebook:delete-cell",
"icon": "@jlab-enhanced/cell-toolbar:delete"
}
],
Closing as answered - feel free to reopen if it is not working.
It would be nice to be able to also convert to raw. Sorry I have no clue how to code it my self !