Markdown, later edits, and HTML
  • Here's the situation: I create a new post using Markdown. It previews properly and publishes properly to my blog. However, if I go to re-open that entry to edit, it's in HTML. My Markdown plugin in WordPress (http://wordpress.org/extend/plugins/markdown-on-save/) stores the Markdown entry so it can be edited again, as I do in WordPress itself all the time. Can I do the same, somehow, in MarsEdit?
  • My guess is the explanation can be found in the plugin description "The markdown version is stored separately (in the post_content_formatted column), so you can deactivate this plugin and your posts won't spew out Markdown, because HTML is stored in the post_content, just like normal."

    In other words, what MarsEdit gets when it asks for a post is the HTML version since the Markdown version is stored in another data field
  • Yeah - it's probably not going to be something MarsEdit can access and edit easily unless it's being stored as the proper content of the post.

    I would consider shopping around for another WordPress plugin that does it that way: stores the content as Markdown and only converts to HTML for display. I think most of the plugins work that way. In that case you'd be able to edit the Markdown perpetually using MarsEdit, provided you stick to "HTML Text" mode in MarsEdit.

    Daniel
  • Thanks for the response. The problem with the other plugins is precisely the same problem I have with MarsEdit: I don't want to lose access to the Markdown formatted text! I understand how the data is stored, I was just wondering if there would be a possibility of MarsEdit accessing the original post the same way OR having it keep the local version in the current format (perhaps by not reading the remote posts and overwriting my local copy at all)...
  • I was setting up a new blog today and thought I would only use Markdown ... but when searching for Markdown plugins it seem that most of them works this way. It does make sense from WordPress point of view since this makes it possible to do the conversion only once which improves performance. It also makes sure that the content is OK even if the Markdown plugin is removed.

    I don't know if this is important enough for MarsEdit to support but it's probably worth 5 min to think about this.
  • Interesting, thanks guys. I didn't realize so many of the plugins worked this way, I just assumed they would do it the "smart" (to me) way and store Markdown natively.

    The fact they do the conversion only once for performance is pretty minor savings and may just reflect the overall shortcoming of WordPress that it's not so good (out of the box) for caching rendered pages/posts.
  • I do not necessarily disagree with that statement :D
  • There is a secondary reason for only rendering into HTML once: it allows the flexibility to stop using Markdown--or bring posts into other systems--that don't grok markdown without having to do some kind of mass conversion. This is an incredibly useful feature in many situations! The performance gain is negligible for most people.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!