Search code examples
javahtmlparsingeditorwysiwyg

editing html/webpages in java


I want to create a java application that allows users to import a web page and be able to edit it within the program.

Importing a web page will render it and the components of the page (images, text, etc) will be editable or draggable, allowing the user to re-layout the components.

For example, the user can load a web page that has an image header, but decides to have it at the bottom of the page. They can simply click and drag the image down and the html will be reformatted appropriately. It is basically a WYSIWYG html editor...

Will this be a difficult task? I am stuck at how to parse the web page into draggable components and being able to export the html after all the edits.

From what I can see, I'd need wrapper classes for html components and a way to keep track of all the changing positions and objects, but I could be wrong. Are there any helpful tools for this task?


Solution

  • I think creating something from sctratch will be difficult. But you can use Eclipse Web Tools Platform (either just by installing it or by developing your own plugin/distribution based on that). It has a fairly good HTML Editor/Web Page Editor which has WYSIWYG features.

    EDIT: Also this question has some tips: Java WYSIWYG HTML editor