I've installed the Markdown Viewer Firefox addon, but I cannot get it to work on my Ubuntu installation. Firefox is my browser of choice and I am trying to move to Markdown in Vim as my basic text-writing software. Is there a way I can get this to work?
Happy to report that I was able to find a solution that I provided here:
I've also copied it here for reference:
On Linux, you'll need to create a new MIME type here:
With the following content:
<?xml version="1.0"?> <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> <mime-type type="text/plain"> <glob pattern="*.md"/> <glob pattern="*.mkd"/> <glob pattern="*.markdown"/> </mime-type> </mime-info>
I had to manually edit my
~/.mozilla/firefox/<PROFILE>/mimeTypes.rdf. This review of the addon says:
For linux users, try to add "md" to .mozilla/*.default/mimeTypes.rdf this line : mdin text/plain section :)
Hmm. I couldn't find a
text/plain section, but I found this page is helpful:
If there is not yet an existing RDF node for 'text/plain' add it, and add "md" as a file extension.
<RDF:Description RDF:about="urn:mimetype:text/plain" NC:value="text/plain" NC:fileExtensions="md" NC:description="Text Document"> <NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/> </RDF:Description>
However, what I ended up doing was:
<RDF:Description RDF:about="urn:mimetype:text/plain; charset=utf8" NC:value="text/plain; charset=utf8" NC:handleInternal="true" NC:description="Markdown Document"> <NC:fileExtensions>md</NC:fileExtensions> <NC:fileExtensions>mkd</NC:fileExtensions> <NC:fileExtensions>mdown</NC:fileExtensions> <NC:fileExtensions>markdown</NC:fileExtensions> <NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain; charset=utf8"/> </RDF:Description>
It seemed to be the
NC:handInternal="true" that did the trick. Interestingly, it seems it does not work with the
text/x-markdown MIME types. The
charset=utf8 is because I write all my Makefiles in Unicode.
I tried Kazark's solution with no success. So I restored the
mimeTypes.rdf file to the default content and it worked.
To do so:
- In a terminal:
- Create a dummy profile and start Firefox with it
- Then in
*.dummydirectory to your profile directory (probably
- Restart Firefox and test
I installed https://addons.mozilla.org/en-us/firefox/addon/markdown-viewer-webext/ right now. It is a signed Add-on from the official Mozilla Add-ons Repository and it is compatible with multiprocess. Cool. :)