File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

paste text from Word into html editor

 
Krsta Jovanovic
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I enable pasting in html editor to work with text taken from a Word document?
 
Eddie Vanda
Ranch Hand
Posts: 281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTextComponent has copy, cut and paste methods. You can call them with ctl X, C and V keys or you can add a popup menue and call them in your program. That would apply to all derived classes such as JTextField and JTextArea. Not sure about the HTML classes, though!
 
Jose Botella
Ranch Hand
Posts: 2120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Krsta,
In this Tutorial you can see that JEditorPane supports the paste action.
I have been able to paste text from Notepad to a JEditorPane displaying an html file; but it did not work with "text" copied from Word.
[ February 06, 2004: Message edited by: Jose Botella ]
 
Eddie Vanda
Ranch Hand
Posts: 281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have clients who copy from Word to my app's JTextArea ok. Word does use non-UTF-8 characters that show up as little squares, but you could translate them.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic