-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default markdown editor to preview #6442
Comments
Thanks for bringing this up! Adding to 1.1 since it isn't a blocker for 1.0. |
I am very much in favour of this change as I would like to sprinkle static markdown files among my suites of notebooks so that the lab environment can take the form of a textbook with live examples. The other part of my use-case is that I would like this to live in the cloud via jupyterhub so that genuinely inexperienced users will be the most likely people to find the content. With notebook files acting as landing pages, it is all too easy for those inexperienced users to switch to editing before they know what the jupyterlab environment is about and how to get their rendered text back. I don't really have an opinion as to whether this should be a change to the default behaviour or configurable (as in the related issue) so that nothing changes for most users. |
The came for us. At Electron Ion Collider (EIC) software consortium we would like to use JupyterLab as a users entry point for EIC software with set of jupyter notebooks and documentation in form of pdfs and notebooks. BTW. Any dirty hack how to do it now (like copy extension, change one line, add as a new extension overriding the functionality) would be VERY welcome. |
@DraTeots I think you can make your own extension (copying the internal one and changing its name + priority). We have done something similar with https://github.com/jupyterlab/jupyter-renderers. |
Thanks for those hints !
Prof Louis Moresi
[email protected]<mailto:[email protected]>
(w) +61 3 8344 1217
(m) +61 4 0333 1413
(us) +1 505 349 4425
www.moresi.info<http://www.moresi.info/>
www.facebook.com/underworldcode<http://www.facebook.com/underworldcode>
@LouisMoresi<https://twitter.com/LouisMoresi>
On 1 Jul 2019, 10:26 -1000, Dominik Moritz <[email protected]>, wrote:
@DraTeots<https://github.com/DraTeots> I think you can make your own extension (copying the internal one and changing its name + priority). We have done something similar with https://github.com/jupyterlab/jupyter-renderers.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#6442?email_source=notifications&email_token=ADABPI5JGQJ7SSNF6LVARXLP5JR73A5CNFSM4HRHADKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY7IAHA#issuecomment-507412508>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADABPI4DYKBGOLGVG435WD3P5JR73ANCNFSM4HRHADKA>.
|
I found this to be not entirely trivial because of this in the const factory = new FileEditorFactory({
editorServices,
factoryOptions: {
name: FACTORY,
fileTypes: ['markdown', '*'], // Explicitly add the markdown fileType so
defaultFor: ['markdown', '*'] // it outranks the defaultRendered viewer.
}
}); which, I think, means that it is not so simple to blast out a new extension. But I would point out that the use-case I raised (inexperienced users should not be able to edit files) can be accomplished (approximately) by disabling the editor extension by default. This is only a workaround for a particular case, but it is reversible via the jupyterlab terminal so expert users can restore their editing capability: # Turn off markdown (and all other) editing capabilities:
jupyter-labextension disable @jupyterlab/fileeditor-extension
# Restore them
jupyter-labextension enable @jupyterlab/fileeditor-extension Obviously this is just a quick fix but it does not require any coding at all ! L |
Thanks for the answer. That exactly what I figured out trying to override the plugin. But I still hoped that I just not familiar enough with API and there is a way to apply ordering some other way. At this moment we came up with the solution to save a workspace in our docker image, so initial README.md is opened in the beginning. Still, this is very limited compared to what we would like to achieve |
A quick update here. With #6813 users can now customize the default viewer for markdown files. Open the advanced settings editor, go to the document manager settings, and enter:
We may add a menu item to do this automatically, but this should help folks unblock for now. The feature will be available in JupyterLab 1.1. |
Thank you - I did try the pull request but decided to wait for it to become official.
Prof Louis Moresi
[email protected]<mailto:[email protected]>
(w) +61 3 8344 1217
(m) +61 4 0333 1413
(us) +1 505 349 4425
www.moresi.info<http://www.moresi.info/>
www.facebook.com/underworldcode<http://www.facebook.com/underworldcode>
@LouisMoresi<https://twitter.com/LouisMoresi>
On 23 Aug 2019, 3:53 AM +1000, Ian Rose <[email protected]>, wrote:
A quick update here. With #6813<#6813> users can now customize the default viewer for markdown files. Open the advanced settings editor, go to the document manager settings, and enter:
{
defaultViewers: {
markdown: "Markdown Preview"
}
}
We may add a menu item to do this automatically, but this should help folks unblock for now. The feature will be available in JupyterLab 1.1.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#6442?email_source=notifications&email_token=ADABPI23AM2IUY3A73LHNRLQF3HBFA5CNFSM4HRHADKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD454HCI#issuecomment-524010377>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADABPI34LMV2PGIQ2HODMHTQF3HBFANCNFSM4HRHADKA>.
|
Fixed by #6813. |
I think the default editor for markdown should be the preview, and not the text editor. It would be nice if from the preview there was an easy way to jump into the editor e.g. with double click as in the notebook.
Related to #4048 but not quite the same because I am not asking to make the default configurable.
The text was updated successfully, but these errors were encountered: