markdown-preview-plus icon indicating copy to clipboard operation
markdown-preview-plus copied to clipboard

Add Syntax Theme Dropdown

Open 9000-volts opened this issue 11 years ago • 5 comments

As discussed in #112, there should be a dropdown box in the settings for the package, which allows the user to choose what syntax theme to use when exporting and previewing markdown. This should be a single, universal dropdown, independent of whether or not github style is being used, but should have different default values: A light theme for github style, and a dark theme for regular style.

9000-volts avatar Sep 15 '15 00:09 9000-volts

Thanks once again for your input @htmlguy

My first thought's to this would be that this is actually being too specific. What I mean by that is why would we just target the syntax theme. To anybody not aware of the idiosyncrasies of MPP that would seem odd. I still also don't believe giving someone options once they have chosen github style makes sense. I think in the absence of an actually github syntax theme as discussed previously https://github.com/Galadirith/markdown-preview-plus/issues/112#issuecomment-139873671 MPP should just choose the best fitting syntax theme.

But if someone really did want to marry the non-syntax (which I just call UI) part of a github style with what ever syntax them they choose then that could be configurable. But I see that as a separate option, to give three possible options something like:

  • Default style (mirrors the UI and Syntax styles for the rest of Atom)
  • GitHub style (always uses a specific UI and Syntax style for the preview, chosen by MPP that looks like GitHubs style)
  • Custom Style (always uses a specific UI and Syntax style for the preview, chosen by the user, probably from a drop down menu in MPP's settings. Here we can also give the user the options to use a GitHub style configurable for both the UI and Syntax styles)

Hopefully that makes sense :D

But I will give this more thought. This isn't likely to make it into our 2.2.0 release but please ping this issue if you wanted an update on its implementation. Thanks @htmlguy

Galadirith avatar Sep 15 '15 12:09 Galadirith

Yes, that actually seems to be a much nicer, more organized and user-friendly way of doing it.

9000-volts avatar Sep 15 '15 13:09 9000-volts

@htmlguy Great, I'm glad you like the suggestion. I'll preliminarily add this as a target for our 2.3.0 release. Thanks @htmlguy

Galadirith avatar Sep 15 '15 14:09 Galadirith

Excuse me, but is there any way I can customize the style/theme besides the "Use GitHub.com style" checkbox? I went through the settings page and README but didn't find any information about it. Ultimately I would like something like the GitHub Dark theme (different from the default theme at border-bottom of h2).

FranklinYu avatar Sep 22 '17 18:09 FranklinYu

@franklinyu, if you're resaonably familiar with LESS/CSS, just add relevant styles to your stylesheet (Edit → Your Stylesheet). ~~div.markdown-preview is a root of preview, ahem, view.~~ EDIT: At some point, root element of preview view changed to markdown-preview-plus-view to disambiguate it from builtin markdown-preview.

lierdakil avatar Sep 22 '17 23:09 lierdakil