rossant / ipymd

Use the IPython notebook as an interactive Markdown editor
BSD 3-Clause "New" or "Revised" License
483 stars 42 forks source link

Add support for jupyter lab? #88

Open derekpowell opened 6 years ago

derekpowell commented 6 years ago

I have Ipymd working for jupyter notebooks but it's not working for jupyter lab. In Jupyter lab, everything looks good (.md files icons changed from markdown symbol to the notebook symbol), but when I open them they open in the text editor and not in the notebook editor.

I don't know much about how jupyter lab is structured so perhaps this isn't something I should've expected to work, but I thought the notebook parts would be similar.

Am I doing something wrong? If not, are there plans to support jupyter lab?

rossant commented 6 years ago

I have never tested ipymd with jupyterlab, I'm sure it wouldn't be too complicated to fix it. Is there any error message or warning in the console when you open a Markdown file?

derekpowell commented 6 years ago

Ok I tested a few things.

  1. When I open the file ipymd-test.md that is in .ipymd style (created and saved in jupyter notebook), jupyter lab opens it in the text editor and gives no messages (no errors/warnings).
  2. When I edit that file in the jupyter lab text editor and save it, jupyter lab saves with the message [I 08:36:26.101 LabApp] Saving file at /ipymd-test.md. Reopening the file still opens it in markdown w/out any messages.
  3. I tried copy/pasting and editing a new file, ipymd-test-header.md where I added a yaml header to the file. It still opens in the text editor and gives no messages.
  4. When I create a new notebook in jupyter lab and save it as ipymd-test2.md, it is saved in proper ipymd style, with the message [I 08:37:40.529 LabApp] Uploading file to /ipymd-test2.md. Further edits show the same save message: [I 08:38:00.996 LabApp] Saving file at /ipymd-test2.md. However, when I close the file and open it again, it opens in the text editor w/ no messages.
  5. I also repeated step 3 for the .odt file extension, saving it as ipymd-test3.odt. Here, jupyter lab again saved this file as a markdown style text file, but the file icon did not change. Instead, it still shows the generic text document file icon. (see image)

screen shot 2018-02-14 at 8 53 29 am

So in sum, looks like ipymd is already working on save for both .md and .odt files, but opening files is not working. The icon in the file browser is also working for .md files (shows the notebook style icon and not the markdown icon), but is not working for .odt files.

grst commented 6 years ago

I created https://github.com/jupyterlab/jupyterlab/issues/3896 to get some input from the JupyterLab side.

derekpowell commented 6 years ago

Wanted to check up on this. Looks like the jupyterlab folks suggested a way forward, though I don't have a sense of how much it would take to implement. Still a feature I'd appreciate tho!