I am using VS Code on my Macbook to run an .ipynb file. It seems that the rendered markdown texts in the markdown cells can not be "selected" by drawing the mouse cursor across them. They can only be selected in the editable/un-rendered mode. Is there a way to be able to select the markdown texts in the rendered mode? I can select the rendered markdown texts in Google colab and jupyter lab, but just not in VS Code.
Is there a way to select rendered markdown text in a Jupyter Notebook markdown cell in VS Code?
261 Views Asked by Michael AtThere are 2 best solutions below
On
Apparently there isn't. This seems to be the subject of an existing issue ticket: Can not select text in markdown cell #120370. Currently, part of the design discussion seem to be how to enable both dragging the markdown cell or selecting text in it. I've left a comment with my own thoughts there. You can also participate in the design discussion, but please try to keep it constructive and avoid making noisy comments like only saying "+1" / "bump". You can just give the issue ticket a thumbs up to convey that. I'm subscribed to the issue ticket and will keep this answer post updated as things progress.
You could work around the problem by disabling drag-and-drop for cells altogether, which you can do using the notebook.dragAndDropEnabled. You'd still be able to move cells using the three dot menu in the cell toolbar and clicking "Move Cell Down" (alt/opt+down) or "Move Cell Up" (alt/opt+up). Of course, it's a workaround because then you wouldn't be able to drag any cells- even non-markdown ones, or markdown ones in edit mode.
For your reference / learning purposes, I found that issue ticket by googling "github vscode notebook select rendered markdown".
I found the solution myself by trying out different VS Code settings. Go to "Customize notebook layout" --> and then disable the setting: "Notebook: Drag and Drop Enabled". Then you can select the text in rendered markdown cells. You can move cells up/down by other means.