Skip to content


Subversion checkout URL

You can clone with
Download ZIP


markdown source formatting #7

paulirish opened this Issue · 4 comments

4 participants


Editing using I get some pretty badass formatting of my markup...


I know we're using Ace editor here but I'm curious if anything similarly can be done.

Also again, not your fault, but the markdown syntax highlighting in ace could use some improvement so headlines are a diff color than body text, etc.



I was thinking when I initially wrote dillinger to provide a way to add one's own "theme" or CSS styling to the rendered markup. Right now, it is falling back to Twitter's Bootstrap styles.

It would require some sort of additional UI (modal maybe) that allows a user to add their own styles for h1, h2, code, pre, li, etc. This would be saved in the "profile" (localStorage) so it would be there everytime. Thoughts?

In regards to the markdown editing, yeah I totally agree. It is one of the things I wish Ace provided and with that being said, it is the key dependency for Dillinger.

Ace does add classes to span tags that hold the text in the editor and those spans declare things like ace_heading, but ace_heading is the equals sign (for an h1 for example), so some JavaScript magic would be necessary to find the span above the place where ace_heading lives (and then apply a style/class based on it). Make sense?

Doesn't seem impossible and futzing around with Web Inspector I was able to do what Mou is doing stylewise. It would be a great addition to Dillinger and Ace overall.


I was playing around with something similar to dillinger. I looked into both ace and codemirror to try and get highlighting similar to

The issue is that both ace and codemirror do their syntax highlighting line by line, which is why they both only highlight the '======' line and not the header text above.

Additionally, if you change the font size for a specific style, the cursor will show up in the wrong spot, because the fixed-width assumptions will be off.


@satchmorun good point


This would be great to see cross-posted with so you can get in dialog with Ace, and potentially improve markdown support for a wider range of Ace users, instead of just Dillinger.

If you post a bug to Ace referencing this one (or vice-versa), github automatically does some really nice inclusion and tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.