GithubHelp home page GithubHelp logo

Comments (4)

joemccann avatar joemccann commented on May 2, 2024

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.

from dillinger.

satchmorun avatar satchmorun commented on May 2, 2024

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

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.

from dillinger.

joemccann avatar joemccann commented on May 2, 2024

@satchmorun good point

from dillinger.

za3k avatar za3k commented on May 2, 2024

This would be great to see cross-posted with https://github.com/ajaxorg/ace 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.

from dillinger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.