joemccann / dillinger

The last Markdown editor, ever.
https://dillinger.io
MIT License
7.95k stars 1.11k forks source link

[FR] ability to use HTML code #766

Open noredistribution opened 4 years ago

noredistribution commented 4 years ago

Would be nice if we could use HTML code, like for example markdown doesn't have a native way of creating "Click to expand" buttons, in that case we can do as described here: https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab That works nicely with markdown, but when it's converted to HTML, the > < characters are converted as well to &lt; and &gt;

torgeros commented 3 years ago

Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. [...]

For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

[John Gruber himself, https://daringfireball.net/projects/markdown/syntax#html]

Inline HTML should be available when markdown is used. This is not about interactive elements like buttons, forms, etc. but stuff like the <details> tag that has no markdown equivalent or the <table> and <img> tags that are really nice to have for their ability to set the width/height attributes.