Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 95146 - Allow rich text as a copy flavor
Allow rich text as a copy flavor
Product: editor
Classification: Unclassified
Component: -- Other --
All All
: P3 (vote)
Assigned To: Milutin Kristofic
: 149096 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2007-02-10 01:41 UTC by _ tboudreau
Modified: 2016-07-07 07:31 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-02-10 01:41:58 UTC
It would be nice to be able to copy source code from NetBeans and paste it into
a presentation/rich text editor with its syntax highlighting intact.  I suspect
all that's needed is to support rich text as a data flavor for our clipboard. 
We already have print to html - it shouldn't be much more difficult.
Comment 1 Vitezslav Stejskal 2007-11-05 13:30:58 UTC
Moving to the 'other' subcomponent.
Comment 2 Vitezslav Stejskal 2008-10-06 15:24:52 UTC
*** Issue 149096 has been marked as a duplicate of this issue. ***
Comment 3 Vitezslav Stejskal 2008-10-06 15:33:29 UTC
BaseKit.CopyAction simply calls JTextComponent.copy(), which does all the magic. I suspect that adding another
DataFlavor would need to cooperate somehow with the implementation in JTC.copy().

> We already have print to html - it shouldn't be much more difficult.

Correct. The editor generates attributed character sequence which is then used for printing (either to a file or printer).
Comment 4 Geertjan Wielenga 2009-02-19 16:19:22 UTC
Maybe the solution is here:

Would it be interesting for the NetBeans sources?
Comment 5 Martin Balin 2016-07-07 07:31:58 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo