简体   繁体   中英

Is there a Java library that converts copied web content to its underlying HTML?

I'm trying to write a simple tool that allows me to copy content from a web page, paste it into a JTextArea and convert it to HTML. Is there a way to do this? Are there libraries out there that will help? This would be similar to what Dreamweaver is able to do when you paste rendered HTML content into the Design area and it's converted back to HTML for you in the Code area.

Instead of using a jTextArea, you can use TinyMCE

This is a JavaScript wysiwig editor, that allows to edit HTML, and get a visual result of the code.

You can use wioth any server technology, because all the plumbing is done in the client side.

You can fully customize the toolbar, even making it completely invisible, so that it only gets the pasted html and shows it.

You can try it here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM