Feature Request/RFC: In-Browser Markdown Support as an Alternative to HTML
Categories
(Firefox :: General, enhancement, P5)
Tracking
()
People
(Reporter: steven, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Firefox currently has no built-in support for rendering a Markdown file to display to the user without the aid of external software or websites.
Actual results:
Markdown files are not rendered in Firefox.
Expected results:
I would like to gauge interest in Firefox getting native Markdown support. This would not only be useful for technical docs in Markdown, but also maybe enable the use of Markdown as a drop-in replacement for HTML (Firefox could use a URL path containing either a HTML or Markdown file). Markdown, in my opinion, is significantly cleaner, easier to write code for, and easier to read than HTML. Because of this, having Markdown become supported could lower the barrier to entry for people to publish content on the internet without the use of an established platform, enable those same people to learn how to code for the first time, and enable seasoned developers to save significant amounts of person hours in development time.
What are your thoughts on this?
| Reporter | ||
Comment 1•7 years ago
|
||
Forgot to add something. Currently no major browser supports Markdown natively. This could give Firefox a shiny chrome edge (heh) over competing browsers. Something to consider.
| Reporter | ||
Updated•7 years ago
|
Comment 2•7 years ago
|
||
I also saw that there are some add-ons related to Markdown, you can check them here: https://addons.mozilla.org/en-US/firefox/search/?q=markdown&platform=Darwin&appver=68.0a1
| Reporter | ||
Comment 3•7 years ago
|
||
(in reply to ovidiu boca from comment #2)
Most addons and programs right now convert Markdown to HTML and then render the resulting HTML code. What I am describing is giving Firefox the ability to directly render the Markdown code without converting it to HTML first. This would enable developers to possibly write entire websites in Markdown as opposed to HTML. And if Markdown was enforced as strictly a markup language for web documents, it could possibly enable several features such as:
- Smaller overall website file sizes
- A more standardized approach to mobile ready web development (eg we could enforce a header graphics design standard for the "markdown web" so it works on every device without the need for a stylesheet or executable scripting code in the first place)
- Less reliance on web frameworks to build static webpages for multiple screen sizes
- Significantly increased privacy (since scripting could be banned under the new spec)
- A significantly lower barrier to entry for developers and non-developers to publish online without the use of a WYSIWYG platform (eg Facebook), thus enabling them full control of their content
Also, if you peel back all the stylesheets and scripting, and compare the HTML language to more modern languages like Python, Swift, and Markdown, HTML looks very dated. (Every time I look at HTML as a language, the film "10 Things I Hate About You" starts playing in my head. That's how dated it is.) I would expect someone coming into programming today to find coding HTML to feel like a chore because of the background context knowledge required to use it successfully. Markdown solves this problem by using various syntax choices to make itself cleaner and easier to read.
Above all else, I've realized that building a Markdown renderer is an opportunity to pull the web back from the control of groups that are outside of public control and re-release it as a truly open internet once again.
Comment 4•7 years ago
|
||
You'll probably have more luck getting responses by posting to the firefox-dev list: https://mail.mozilla.org/listinfo/firefox-dev Bugzilla is usually the place where concrete work items are tracked and discussed.
| Reporter | ||
Comment 5•7 years ago
|
||
(in reply to Drew Willcoxon from comment #4
Thanks for linking me to the mailing list. I'll go ahead and test the waters over there as well.
Comment 6•5 years ago
|
||
I know this is an old feature request, but I thought I would mention this
Considering markdown has the "variant" parameter in it's internet media type (see RFC 7763), making it render in the browser becomes alot easier as we don't have to worry about which "flavor"/"variant" of markdown is being used unless it is missing.
Having it not be converted to HTML is a bad thing in my opinion, as it is common to put HTML into markdown files for complex things like forms or embeds.
Comment 7•5 years ago
|
||
(Sorry seems I hit some keyboard combo that sent the comment earlier than I wanted)
Markdown has no real to add meta info about pages like HTML,
there are some ways using YAML like this:
---
key: value
key2: value
---
*markdown here*
but this would require making a specification for converting this to HTML meta tags and the sort, which isn't our goal here.
Therefore having the ability to but HTML into the markdown for things like <title> would be good.
And as webpages run off HTML at the moment, everything would have to have support for both HTML and markdown.
Plugins/extensions and Firefox itself are designed around using HTML and it's DOM, they cannot use markdown.
Updated•4 years ago
|
Comment 8•2 months ago
|
||
Most addons and programs right now convert Markdown to HTML and then render the resulting HTML code. What I am describing is giving Firefox the ability to directly render the Markdown code without converting it to HTML first.
I also desire support for CommonMark (or a superset thereof), but I definitely want the implementation to be conversion into HTML, first. That is how PDF.JS does it, etcetera. Having ECMAScript be disallowed would be nonsensical, because CommonMark supports most HTML5 features, of which that is an example.
(In reply to Mr Beedell, Roke Julian Lockhart [:B.RJL] from comment #8)
Most addons and programs right now convert Markdown to HTML and then render the resulting HTML code. What I am describing is giving Firefox the ability to directly render the Markdown code without converting it to HTML first.
I also desire support for CommonMark (or a superset thereof), but I definitely want the implementation to be conversion into HTML, first. That is how
PDF.JSdoes it, etcetera. Having ECMAScript be disallowed would be nonsensical, because CommonMark supports most HTML5 features, of which that is an example.
As an implementation detail, converting Markdown (Commonmark + some set of extensions) to HTML on the client side makes sense, I agree. However I think I could use a bit of clarification about your ECMAScript point: I think that omitting this support fits naturally with the original proposal to build a very easy path for new web authors.
It makes sense to me to want to publish simple files in a directory served by an HTTP daemon, with no additional steps. Omitting ECMAScript support should simplify the implementation - and more importantly diminish the number of caveats that a new author would have to read and care about - without preventing anyone from adopting an HTML + CSS + ECMAScript + build tooling workflow later on in their personal development process.
Is your argument that the hypothetical Markdown rendering implementation described in this bug should include ECMAScript because HTML5 includes it, and because Commonmark does (or should?) support all of HTML5? I don't quite follow.
Description
•