Request: "print" view toggle along with "preview" and "edit"

Is it possible to create a third button after “edit” and “preview” called something like “print” that has a radically different css styling?

I would like it to strip out links and hides anything in a or tag, and hides superscript and footnotes and such.

My particular use case is that I’m an author trying to figure out the best way to “mark up” a working chapter with notes-to-self kinds of things, but still be able to copy/paste it onto the web or a submission file without any of my metadata / notes stuff for publication purposes).

It’s definitely possible with a css snippet I could toggle on and off, but how hard would it be to have a third toggle in that ui spot? Is it even possible with a plugin? I feel like this might solve some things for the people who want to be able to assign meta tags that aren’t for the YAML block (i.e. they could be searchable) so you can sort of switch between a “clean” copy of a file, a “working” copy of a file (i.e. where the tags and links work and superscript notes-to-self are visible), and the “raw” copy of the file (i.e. just raw markdown, where the links aren’t clickable and the embeds aren’t visible).

5 Likes

Update:

@koala created this amazing autohotkey script that is a great workaround for people who are trying to do something similar.

^!v::
; strip all wikilinks of the links and only keep names and aliases 
Clipboard:=RegExReplace(Clipboard,"(?:\[\[(?:.+?)[\|](.*?)\]\])","$1")
Clipboard:=RegExReplace(Clipboard,"(?:\[\[(.+?)\]\])","$1")
Send ^v
Return

It’s not a perfect solution, but it’s a heck of a lot better than copying the file over into word, creating a single hyperlink for the whole thing, and then removing the hyperlink – which was my previous workaround.

It basically lets you ctrl+alt+v to paste a copy of something that doesn’t have any of the link formatting :slight_smile:

A note:
This doesn’t clean up links to headings and block references.
I have made a Regex to detect them, but I haven’t got it to work in Autohotkey (the way it worked is that it detected everything but the simple links…).

Cross-posting for those that might stumble upon this thread:

1 Like