-
Notifications
You must be signed in to change notification settings - Fork 251
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
Need .md file support #86
Comments
I will take a look |
Thank you for working on this! I will try to test it this weekend. |
Looking forward to your feedback after the release. |
I just tested it. I can now edit .md files with syntax highlighting. This is a big step towards my goal, thank you! However, CodeMirror is still using a variable-width font in the editor. This is hard for .md files, because they use text-aligned tables (and frequently use ASCII art). My filemanager.config.json does have this snippet with "theme": "default", which came from your revised filemanager.config.default.json file:
I don't know why CodeMirror is still using the variable-width font. (I assume that font comes from "theme": "elegant" which was in the previous version of the default configs.) Finally, I'm not sure what to expect from your commit titled "... (*.md) preview ...". Is there supposed to be some kind of .md to HTML rendering happening? When I click on my README.md file all I get for a "preview" is a large graphical icon of a white piece of paper. I have a working dev environment now, so let me know if there is anything I can do to help. Thanks! |
The CodeMirror "default" theme is being overridden by theme.css: line 3 and filemanager.css: line 5. Unchecking these two gives the correct monospace CodeMirror shown in this image. However, these lines show up many times in the CSS parent history, so I don't know how or where to remove them. (Also, just unchecking them completely makes the rest of the text not look as nice.) It's been a few years since I did CSS work... is this something easy for you to fix? |
I have changed font to monospace within the latest commit. For further customization use RFM css theme files.
Right, perhaps the message of my commit was not quite correct. I meant not preview, but modification. Nevertheless implementing a preview of CodeMirror supported files in the readOnly mode, which is displayed right after the file is opened, is a good idea. It's require new "viewer" to be implemented with related options and so on. I'm going to consider this idea more thoroughly and, most likely, I will add it to my todo list. |
Confirmed working on Chrome. It looks great, thank you! I think this issue can be closed now. (I filed a separate issue for rendering Markdown into HTML.)
I'm going to spend a couple of hours on this today. I saw the API for the other viewers yesterday. I will try to create a new "viewer" using Markdown-it to render the .md file into HTML. |
In case of implementing new viewer, make it supporting multiple formats, please, not just [.md] files. In general, as I described in the previous comment, I expect the VIEWER will work the same way as the CodeMirror EDITOR does now, but the VIEWER will display files content in the readOnly mode right after opening (instead of displaying a large graphical icon of a white piece of paper). "Edit" button still available and changes readOnly mode to The minimal set of options for the new section in the configuration file may look as:
Of course, it makes sense to implement side-by-side markdown renderer for [.md] files solely. For other file types it will work as a simple reader. |
Markdown editor support released in v2.2.0 |
I was using the demo and found the following:
I would consider these bugs.
Thanks!
The text was updated successfully, but these errors were encountered: