Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output raw HTML when "field is not valid for Markdown rendering" #43

Open
jakov opened this issue Jan 14, 2013 · 4 comments
Open

Output raw HTML when "field is not valid for Markdown rendering" #43

jakov opened this issue Jan 14, 2013 · 4 comments

Comments

@jakov
Copy link

jakov commented Jan 14, 2013

I just wanted to type a post in a forum that allows for HTML comments but only supplies a simple text field for raw HTML input; so I started writing my message in Markdown, believing that i could later convert it to HTML. However, MarkdownHere tells me that "The selected field is not valid for Markdown rendering. Please use a rich editor."

MarkdownHere should ask: "The selected field is not valid for rich text editing. Do you want convert the Markdown source to raw HTML?" and provide an "Ok"- and a "Cancel"-button along with a checkbox for "Don't ask before converting to raw HTML" (which has no effect if you cancel).

@adam-p
Copy link
Owner

adam-p commented Jan 29, 2013

This is related to #36. I closed that issue with the comment that it's "outside the domain of Markdown Here". I'm going to leave this one open for now, though, because the way you've framed it is compelling.

I'm not sure if/when I'll get to it, but I'm going to keep thinking about it. I've been thinking about refactoring with the aim of better modularization (support for different markup renders, for example) and I'll try to accommodate this functionality.

@ericridgeway
Copy link

+1 for this request

I was just about to start a new issue and found this one already open

Basically what we want is TWO Markdown Here keystrokes/menuOptions:

  • Convert markdown to htmlOutput
    • (This is what it currently does. And thank you so much for such wonderful code and hard work!!!)
  • Convert to raw html
    • The reason we're begging for this is because we kind of assumed he's already doing this behind the scenes
      • In a perfect world, wouldn't that be how this fancy "rich text stuff" get's generated?
        • You take our markdown, run your magic equations to turn it into html, , and then just hand that to the rich text editor to do his thing

... Of course, I have no idea if that's true. Maybe you're not generating html at all, and there's a whole bunch of snake-wrangling that has to happen to make the stupid rich text editor behave the way you've gotten it to :D

Anyways, the Raw Html would be ridiculously valuable to a lot of us if you have the time to add the feature

For example:

  • I need to add a static page to my blog
  • Typing out actual html is for peasants
    • It would be OH-so-nice to spit out some markdown, highlight everything, and run a Markdown Here shortcut to get some beautiful raw html output I could save for the page :)

@adam-p
Copy link
Owner

adam-p commented Oct 16, 2013

While investigating Tumblr compatibility I found that it would work better if this feature existed. See: https://github.com/adam-p/markdown-here/wiki/Compatibility#wiki-tumblr

@adam-p
Copy link
Owner

adam-p commented Oct 25, 2013

While investigating Disqus I found that it accepts a subset of HTML tags. The odd thing about it, though, is that the compose box is contenteditable, so it actually appears to be a valid render target but isn't. Tests and stuff here: http://www.crypti.cc/blog/2013/10/18/mdh-disqus-test/

So, when this feature is implemented, there should be overrides for render-to-raw-HTML even when the edit element is contenteditable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants