tag:support.markedapp.com,2011-09-11:/discussions/problems/147307-openingpreviewing-a-file-from-bbeditMarked: Discussion 2021-05-07T00:33:00Ztag:support.markedapp.com,2011-09-11:Comment/453579382018-05-26T20:07:22Z2018-05-26T20:07:22ZOpening/previewing a file from BBEdit<div><p>BBEdit's "Markup->Preview in..." renders a temporary HTML file from the<br>
Markdown and opens that. It's not actually opening the file in Marked.<br>
Marked won't do anything other than display it because it doesn't<br>
attempt to override HTML styles, and when the temporary file is cleaned<br>
up by BBEdit, then Marked is left hanging with no file at all.</p>
<p>To preview the file you're currently editing and be able to update on<br>
save (and take advantage of Marked's feature set), the best bet is to<br>
just drag the proxy icon from the BBEdit title bar to Marked's icon.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/453579382018-05-26T20:22:21Z2018-05-26T20:22:21ZOpening/previewing a file from BBEdit<div><p>Just whipped up a little script:</p>
<pre>
<code>tell application "BBEdit" to set mdFile to file of document of window 1
tell application "Marked 2"
activate
open mdFile
end tell</code>
</pre>
<p>Save that as "~/Library/Application Support/BBEdit/Scripts/<br>
Open in Marked.scpt" using Script Editor and then you can assign a shortcut key in BBEdit Preferences->Menus to trigger it. It will simply open whatever file BBEdit is currently editing in Marked.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/453579382021-05-07T00:32:59Z2021-05-07T00:33:00ZOpening/previewing a file from BBEdit<div><p>Ran into the same issue with BBEdit two years on. Your little script @Brett works like a charm. As @Peter said, not such a major problem, just a little annoyance. I suppose one could use the BBEdit previewer, but Marked 2 just has so many more capabilities. Thanks for the script.</p></div>John Holland