Menu

#166 Colorized copy RTF to Clipboard (IText plugin?)

open
nobody
None
5
2010-04-14
2010-01-04
Alan Ezust
No

From Microsoft Dev Studio, it is possible to copy to clipboard selected text, and paste it into other MS apps which recognize that particular MIME type, such as MS-Word.
This means it is possible to copy/paste colorized text.
I'm pretty sure all that is needed is to determine what is the MIME-type and mime-format used to store colorized text from ms-dev studio and mimic it from jEdit, using the colors from jedit's syntax.

Discussion

  • Alan Ezust

    Alan Ezust - 2010-02-18
    • summary: Copy to Clipboard: colorized text a la msdev studio --> Code2HTML: Colorize and Copy to Clipboard
     
  • Alan Ezust

    Alan Ezust - 2010-02-18

    It turns out the mime-type is HTML.

    So basically this is just something that currently requires a 2 steps in Code2HTML - convert to HTML, copy to clipboard.

    If there was a way for code2html to add the extra HTML to the list of supported mimetypes whenever text is copied to the clipboard and actually set the mime-type to HTML, then we could paste colorized text into other applications from jEdit.

    Can we make it so Code2HTML offers an alternate "copy to clipboard" action that takes the regular text and copies it like usual, but then converts it to HTML and offers the HTML as a second mimetype?

     
  • Alan Ezust

    Alan Ezust - 2010-02-18
    • summary: Code2HTML: Colorize and Copy to Clipboard --> Code2HTML: Colorized copy to Clipboard
     
  • Alan Ezust

    Alan Ezust - 2010-02-18

    Something to think about: when we copy/paste from within jEdit, if we have one of these multiple format mimedata available, it should ignore the HTML and paste the text version back. Then the new action could be used instead of the built-in one, as it currently works in MS Dev Studio.

     
  • Alan Ezust

    Alan Ezust - 2010-02-18

    OpenOffice can also be used to paste colorized text into, not just MS-office. So this is not a microsoft-specific feature.

    I want to be able to copy text from jEdit and paste it colorized into OpenOffice Impress.

     
  • Matthieu Casanova

    I think it is done using TransferHandler and dataflavor.
    I suppose that when code2html is installed it could add a new html dataflavor and when we copy some text it would handle the case when the received ask for this flavor.
    But it would probably require some changes in the core. I can take a look at that

     
  • Alan Ezust

    Alan Ezust - 2010-04-13

    I was mistaken, it is not copying HTML into the clipboard, it is copying RTF into the clipboard.
    So we need to convert to colorized RTF, add that as an alternate data flavor.
    Perhaps we can do that from HTML or perhaps it is better to do it directly, but this might not be part of the code2HTML plugin.

     
  • Alan Ezust

    Alan Ezust - 2010-04-13
    • summary: Code2HTML: Colorized copy to Clipboard --> Colorized copy RTF to Clipboard
     
  • Alan Ezust

    Alan Ezust - 2010-04-14
    • summary: Colorized copy RTF to Clipboard --> Colorized copy RTF to Clipboard (IText plugin?)
     
  • Matthieu Casanova

    I have a problem here, the RTF part is an extension to iText because iText is a PDF library and I'm unable to find where I can get this RTF extension

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.