Define target attribute for <a> tags?
I mostly use Marked to generate HTML files that are then used in iframes. I would like the links in those iframes to open either in the parent window or a new tab. Is it possible to tell Marked that all of my links should have either target=_blank or target=_parent?
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Brett on 23 Aug, 2013 02:07 PM
This would be best handled with JavaScript. You can add such attributes using reference links in MultiMarkdown, but you'd have to do it for each one. The best option is to have a JavaScript that intercepts links (onclick) and forces them to open in new windows. If you need help writing something like that, let me know.
-Brett
2 Posted by davidjohnmacdon... on 23 Aug, 2013 03:49 PM
Thanks for the quick response. I instead wrote a Javascript that adds an attribute to all a tags called by window.onload. Is there a way I can ask Marked to default to *not* "include preview template on export"? It's just that I'm forgetful.
Support Staff 3 Posted by Brett on 23 Aug, 2013 03:58 PM
Marked should remember your last setting for style inclusion, is that not happening?
4 Posted by davidjohnmacdon... on 23 Aug, 2013 04:02 PM
It remembers within the session only.
If I close and re-open Marked, it returns to the default setting when I save.
Support Staff 5 Posted by Brett on 23 Aug, 2013 04:05 PM
I'll fix that as soon as I can.
Thanks,
Brett