sparksuite / simplemde-markdown-editor

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://simplemde.com
MIT License
9.8k stars 1.12k forks source link

Dark theme #455

Open Polsaker opened 7 years ago

Polsaker commented 7 years ago

As a feature request, could you include a dark theme for simplemde? I've tried to do one, but I can't get to make the "flashing cursor bar" white.

ProjectInfinity commented 7 years ago

I second this. I wanted to use simplemde but noticed how horribly it handled dark themes that I had to look for alternatives.

jake commented 7 years ago

The actual text editor is CodeMirror, which has support for different themes. If you include another theme's CSS file, you can switch the theme SimpleMDE is using by calling directly into the CodeMirror instance.

e.g.

var simplemde = new SimpleMDE({ element: $("#input")[0] });
simplemde.codemirror.setOption("theme", "3024-night");
ProjectInfinity commented 7 years ago

That does not seem to alter the buttons. The theme only affects the editor, but the buttons are next to impossible to see on a dark background.

xcatliu commented 7 years ago

Hi, I've built a theme system for SimpleMDE, it's easy to create your own theme. Hope this would help you!

Related issue: #498

jake commented 7 years ago

@xcatliu that looks awesome, thank you! and thanks for including an option to roll your own.