Marked (app) cannot be used as Preview Helper in BBEdit

180 views
Skip to first unread message

Martin Post

unread,
May 6, 2012, 5:47:25 PM5/6/12
to bbe...@googlegroups.com
Hello guys,

I'm using BBEdit to edit files in Fletcher Penney's MultiMarkdown (MMD), an extended version of John Gruber's popular Markdown syntax. The file extension I'm using for these files is .md, and BBEdit applies Markdown syntax highlighting (which misses a few MMD-specific goodies, but that's not an issue).

I'm also using "Marked" by Brett Terprstra (http://markedapp.com/), a wonderful Markdown / MultiMarkdown preview / conversion tool. Marked takes a MD/MMD file and renders it as HTML on the fly.

Now I tried adding Marked as a Preview Helper in BBEdit, but this doesn't work.

Marked is recognized and added to the list of helpers. I can write and save a MultiMarkdown file and select "Markup" > "Preview in Marked 1.4" in BBEdit, and the Marked app will even launch. But no document is displayed - neither as raw Marked code nor as a rendered HTML document.

Any idea how to resolve this issue?

Thanks a lot.

TJ Luoma

unread,
May 6, 2012, 7:49:46 PM5/6/12
to bbe...@googlegroups.com


On May 6, 2012, at 7:12 PM, Martin Post <martinpo...@googlemail.com> wrote:

Marked is recognized and added to the list of helpers. I can write and save a MultiMarkdown file and select "Markup" > "Preview in Marked 1.4" in BBEdit, and the Marked app will even launch. But no document is displayed - neither as raw Marked code nor as a rendered HTML document.

Any idea how to resolve this issue?


http://db.tt/CwGoVe0u

Put this in your ~/Application Support/BBEdit/Scripts/ as "open in Marked.zsh" or similar.

Then use that to open the file in Marked.

That's how I've done it, at least. 

TjL


Christopher Stone

unread,
May 7, 2012, 3:48:12 AM5/7/12
to bbe...@googlegroups.com
On May 06, 2012, at 16:47, Martin Post wrote:
Now I tried adding Marked as a Preview Helper in BBEdit, but this doesn't work.

Marked is recognized and added to the list of helpers. I can write and save a MultiMarkdown file and select "Markup" > "Preview in Marked 1.4" in BBEdit, and the Marked app will even launch. But no document is displayed - neither as raw Marked code nor as a rendered HTML document.
______________________________________________________________________

Hey Martin,

Hmm.  I can't make it work either.  If nobody offers a workable fix pretty quickly then contact support.

In the meantime here's a Applescript work-around.

--
Best Regards,
Chris

-----------------------------------------------------------------------------
try
  tell application "BBEdit"
    set frontDocFile to file of front document
  end tell
  if frontDocFile is not missing value then
    tell application "Marked"
      open frontDocFile
      activate
    end tell
  end if
on error eMsg number eNum
  set {c, s} to {return, "------------------------------------------"}
  set e to s & c & "Error: " & eMsg & c & s & c & "Error Number: " & eNum & c & s
  beep
  display dialog e
end try
-----------------------------------------------------------------------------

Martin Post

unread,
May 7, 2012, 8:11:47 AM5/7/12
to bbe...@googlegroups.com

On Monday, May 7, 2012 9:48:12 AM UTC+2, Christopher Stone wrote:

Hmm.  I can't make it work either.  If nobody offers a workable fix pretty quickly then contact support.
In the meantime here's a Applescript work-around.

I had found and successfully used a script similar to the one you suggested a few hours ago (also works for Multimarkdown, my other favorite MMD editor). But I also contacted support, as this seems to be a bug.

Thank you to both of you!

Cheers,

Martin

Reply all
Reply to author
Forward
0 new messages