When I use a jupyter notebook,
I would like new cells to be of type "markdown".
By default, the type of new cells is "code". Which config file should I modify and which variable should I change?
While in command mode: A to insert a new cell above the current cell, B to insert a new cell below. M to change the current cell to Markdown, Y to change it back to code. D + D (press the key twice) to delete the current cell.
There are three types of cells: code cells, markdown cells, and raw cells. Every cell starts off being a code cell, but its type can be changed by using a drop-down on the toolbar (which will be “Code”, initially), or via keyboard shortcuts.
You can add new cells by using the + CODE and + TEXT buttons that show when you hover between cells. These buttons are also in the toolbar above the notebook where they can be used to add a cell below the currently selected cell. You can move a cell by selecting it and clicking Cell Up or Cell Down in the top toolbar.
In JupyterLab, you can go to Settings -> Advanced Settings manager -> Notebook
and then add the following in "User Preferences":
{
"defaultCell": "markdown"
}
Go to the site-packages
directory of your python environment and modify site-packages/notebook/static/notebook/js/main.min.js
Find something like
Notebook.options_default = {
// can be any cell type, or the special values of
// 'above', 'below', or 'selected' to get the value from another cell.
default_cell_type: 'code'
};
change default_cell_type: 'code'
into default_cell_type: 'markdown'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With