standardnotes / markdown-basic

[Moved to https://github.com/standardnotes/app] A basic Markdown editor for Standard Notes
https://standardnotes.com
GNU Affero General Public License v3.0
11 stars 12 forks source link

Syntax highlighting #11

Closed bashfulrobot closed 5 years ago

bashfulrobot commented 5 years ago

Are there any plans to add syntax highlighting to this extension? I see that issue https://github.com/sn-extensions/simple-markdown-editor/issues/5 references code highlighting.... is this supposed to happen already (and maybe I am having a problem).

Thank you.

moughxyz commented 5 years ago

Hmm..looks like it's working, but the syntax is very strict.

You have to type three backticks ``` followed by the language, with no space. So ```css

If you don't want to specify a language, you have to put an empty space after the first 3 backticks.

Needless to say, it shouldn't be behaving like this. Need to investigate this further.

bashfulrobot commented 5 years ago

Also, how about syntax highlighting of the markdown itself when in edit mode?

moughxyz commented 5 years ago

The Fancy Markdown Editor does this, as well as the Advanced Markdown Editor.

bashfulrobot commented 5 years ago

Hi there, yes they do, but I was looking to just use the one editor and preferred this one as if has the option to stay in a preview mode - which is nice for reading your notes.

moughxyz commented 5 years ago

I haven't seen any Markdown editor in general (short of Typora) that does edit-mode syntax highlighting in a way worth looking at. Minimal Markdown Editor also does this, but it's just one color regardless of language.

bashfulrobot commented 5 years ago

That makes me think of an idea, what about supporting editing notes in an external editor? Alright I could copy/paste. But would be a much cleaner experience.

moughxyz commented 5 years ago

Check out https://github.com/tannercollin/standardnotes-fs

moughxyz commented 5 years ago

Syntax highlighting is now better handled in the editor.