WordPress / better-code-editing

[✅ Merged into 4.9-alpha] Better Code Editing WordPress plugin
https://wordpress.org/plugins/better-code-editing/
37 stars 16 forks source link

Decide on which modes and themes should be bundled with core #24

Closed westonruter closed 7 years ago

westonruter commented 7 years ago

There are about 120 modes that CodeMirror ships with: https://github.com/codemirror/CodeMirror/blob/5.28.0/mode/meta.js#L15-L168

The vast majority of these modes are not relevant to the kinds of types that will be modified in WordPress. Which ones should be included? At least there should be:

But then what about:

And then are there any others shat should be included? What about twig?

There is also then the question of themes. There are 48 different themes. Should we only include one? See https://github.com/codemirror/CodeMirror/tree/5.28.0/theme

melchoyce commented 7 years ago

Let's only include one theme in core by default, but consider making (or encourage someone else to make) a plugin that lets you swap them. I'll take a look at them this week and propose a default 👍

kenashworth commented 7 years ago

Ambiance is my personal fav.

kenashworth commented 7 years ago

Markdown (and maybe github flavored markdown) might be good to include too

melchoyce commented 7 years ago

Color schemes all demo'd here: http://codemirror.net/demo/theme.html

melchoyce commented 7 years ago

These are the color schemes I think are the most legible and attractive:

I'm thinking we should either go with default, or roll our own, like: https://gist.github.com/melchoyce/1f1dcf2307e8f699a6122c8399db54f1

westonruter commented 7 years ago

I've removed all the themes from being bundled, leaving only the default. A plugin can bundle those themes to enqueue as desired. I've also added the modes I think make sense. See #66.