Hello All,

Some time ago I asked Terry about being able to copy rich text from a 
browser window and paste rst. I was pointed to a solution that uses xclip 
and pandoc and have been using it since by running it in a command window 
and copy/pasting the output into Leo. This worked as I only needed to do 
this on rare occasions. I recently switched over to using markdown and the 
command line to make this happen works just great. I find myself using this 
capability more and more often though.

xclip -o -selection clipboard -t text/html | pandoc -r html -w markdown

My question is: How do I automate this in Leo? It would be nice to be able 
to have this command run on all pastes (Ctrl-v) that have a markdown file 
as a destination, with plain text as a fallback if the clipboard provides 
something that isn't text/html.

The usual disclaimer about me not being a programmer applies. I use Leo to 
write, not code.

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to