I wrote in Markdown, I sent Markdown, I told it to use Markdown, but now it's HTML
  • I have "Text Filter" under "Server Options" set to "Markdown" in the "Compose" window.

    In the settings for the blog, I have "Preview Defaults - Preview Text Filter" set to "Markdown" and I have "Post Editor - Server Text Filter" set to Markdown.

    When I send the post to Squarespace, it ends up as Markdown, but MarsEdit shows it in HTML.

    How do I preserve my lovely Markdown?

    p.s - HTML drools, Markdown rules.
  • Hi TJ - it sounds likely that Squarespace is converting the content to HTML after it is published. By any chance do you think you have your "default editing mode" on Squarespace set to HTML?

    MarsEdit will not convert your Markdown to HTML unless you switch from HTML Text mode to Rich Mode.

    Daniel

  • I finally think I've tracked this down, but it definitely seems (to me, at least) like a MarsEdit problem. Either that or SqSpace is giving some bad info via API?

    To answer your question: Under http://tjluoma.squarespace.com/display/configuration/Basic?section=editing it says "Editing System" and I have it set to "Use Markdown Editing System."

    In MarsEdit, I have "Server Options" set to "Text Filter" = "Markdown" and "Default Editing Mode" is HTML.

    *BUT* as soon as I post via MarsEdit, the post is converted to HTML inside MarsEdit. If I look at the post on SquareSpace, it is shown in Markdown.

    I made a little screencast, so you can see exactly what I am seeing. I hope it helps:

    http://f.luo.ma/MarsEdit-Squarespace-Markdown-to-HTML.m4v

    (It's about 1m50s and shows me just posting a new message via ME to SqSp. I cut out the part where I'm waiting for the website to load.)
  • Thanks for the video, TJ.

    MarsEdit does not convert from Markdown to HTML unless you explicitly switch to Rich Text editing mode. I know it looks like it "changed in MarsEdit," but that's because part of the publishing process involves MarsEdit asking, at the end, for the server to return the final, true copy of the post as it is published on the server. This is splitting hairs to some extent because you end up with unwanted HTML in your MarsEdit copy of the post, but I want to be clear that MarsEdit is not doing the conversion.

    That said, I just did some tests against my SquareSpace account and I am seeing behavior that suggests MarsEdit is neglecting to provide the proper cues to SquareSpace that the content is in Markdown format. SquareSpace uses a custom mechanism for specifying the filter type, and I may have screwed something up along the line.

    I'm going to look into this a bit closer.
  • That's sort of what I was thinking might be happening, because if MarsEdit was making it HTML, then I'd imagine it would be HTML on SqSpace.

    Thanks for checking it out.
  • Sigh - it looks like a few issues are at play here. I am writing up a message at the SquareSpace developer support forums, so that they are aware of all the things I have observed as being problematic in the API's support for text filters.

    http://developers.squarespace.com/features-system/post/1717073?lastPage=true

    I'm adding it to my plans for the next MarsEdit update to change the encoding of the text filter parameters in Squarespace posts, to match their apparently changed meaning in the API. In the mean time, the only workaround I can think of for you is:

    1. After posting a new post in MarsEdit, do a Refresh of the blog to get a copy of your post with the correct text filter specified and the appropriate unconverted HTML included.

    2. When you edit a post with MarsEdit, take care to change back the Text Filter option on the post from Textile to Markdown. It will select Textile instead of Markdown because of another bug at Squarespace where they are returning the wrong value for the text filter in the response to refreshing the blog.

    There's a lot of junk going on here that needs to be fixed. Ideally Squarespace would fix it all on the server, for consistency with how MarsEdit already works and has worked better with Squarespace in the past, but if they don't make any fixes soon I'll still try to ameliorate the situation in an update soon.

    Daniel
  • TJ - I forgot to mention this, but from your end of things, if you read and agree with my analysis on the developer forums, it would be useful to contact Squarespace as a paying customer, point to the developer thread, and let them know you would like to see the behavior improved.
  • Done. Thanks.
  • I have also sent my comments to Squarespace customer service about this issue. But probably not much hope in them fixing this considering the time that have passed and their recently release of v6. Nonetheless, I have tried.
  • I did get in touch directly recently with a Squarespace developer who gave me some hope they would try to address this. The problem with V6 of course is they don't support an API at all, yet.
  • I'm still communicating with them, and have pointed them to your post at their developer forum. But based on the last mail from them, they still seem to blame MarsEdit for the problem. But I continue to point to the post from you and quoting parts of hit. Hope that your inside contact might be able to do something about it. Support for external clients (like MarsEdit) was a major reason for me choosing v5 instead of v6
Start a New Discussion

Howdy, Stranger!

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