← Back to team overview

zim-wiki team mailing list archive

Re: How to paste formatted (rich) text to Zim editor? (Feature request?)


If you are a CLI junky:

sudo apt-get install xsel
alias gc='xsel -b'	# Get Clipboard
alias pc='xsel -bi'	# Put Clipboard

Now you can do many awesome things by reading/writing the clipboard and using CLI tools!

alias strip='xsel -b | xsel -bi'	# Strip <stuff> for Zim

You might be able to add something like that to a launcher. Worst case you could write a 2 line shell script and add that to a Mint launcher. I personally find it easier to flip to my CLI and do it, but whatever.

FYI, I'm writing this from Thunderbird on Mint 17. :-)

On 04/20/2016 04:55 AM, J. M. Korhonen wrote:
Thanks for the help. It indeed seems to be a problem with source
program, as formatted text from e.g. OpenOffice pastes nicely. Ah well,
will have to continue using the gedit intermediate step; from answers to
Marco's earlier question, I noted that there's apparently Perl script
that strips the clipboard formatting but I'm probably too lazy to use it

My system is Linux Mint 17.3., BTW.

Thanks again,


On Tue, Apr 19, 2016 at 3:21 PM, Marco Cevoli <marco.cevoli@xxxxxxxxx
<mailto:marco.cevoli@xxxxxxxxx>> wrote:

    I had a similar issue with text pasted from PowerPoint, which is
    pasted as image. It's something related to the "source" program, not
    to Zim Wiki. If you search for messages posted by me, you should see
    the answer I got at the time I posted about this strange behaviour
    (sorry, I can't remember what it was).


    Marco Cevoli

    On Tue, Apr 19, 2016 at 2:15 PM, Paulo van Breugel
    <p.vanbreugel@xxxxxxxxx <mailto:p.vanbreugel@xxxxxxxxx>> wrote:
     > On Tue, Apr 19, 2016 at 1:52 PM, J. M. Korhonen
    <jmkorhonen@xxxxxxxxx <mailto:jmkorhonen@xxxxxxxxx>>
     > wrote:
     >> Hiya, and many thanks for excellent note-keeping software.
     >> The only problem I have with it is that I sometimes need to
     >> formatted (rich) text to my notes; specifically, I have a
    reference manager
     >> (Mendeley) that on command copies a formatted citation of a
    paper to my
     >> clipboard, and I'd like to paste that directly to my note.
    Ctrl-V or Paste
     >> command on Zim editor window doesn't do anything, apparently
    because the
     >> citation is formatted (e.g. journal name in italics).
     > That is strange, I can copy formatted text to Zim without
    problems, for
     > example when copy/paste formatted text from Zotero (the text is
    pasted as
     > unformatted text in Zim). What OS are you on (I am on Linux)?
     >> My workaround is that I paste the citation to gedit text editor,
     >> strips it of formatting, and then copypaste from there to Zim.
    This is a bit
     >> clunky approach, and I was wondering whether there is some way
    to get around
     >> the problem? I'd love to be able to paste any text directly to
    Zim editor,
     >> with Zim stripping the formatting automatically.
     >> I tried to search if anyone else has the same issue, but
    couldn't find any
     >> leads.

--  -------------------------------------------------------------------
JP Vossen, CISSP | http://www.jpsdomain.org/ | http://bashcookbook.com/