Devs, I've been brainstorming about implementing office importer functionality in wysiwyg where the user will be able to upload a document and have it's content imported into the current page being edited (i.e into the wysiwyg editor). Note that we already have the copy/paste functionality implemented.
The first problem I see is that GWT doesn't have a way to upload a file with a usual RPC call. Given the parameters, following is one possible way out of this problem, 1. Define an OfficeImporterServlet which mapps to /xwiki/officeimporter 2. Let the office importer wysiwyg plugin make a POST request to this servlet with a FileUpload widget ( http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FileUpload.html ). 3. The servlet will import the document into xhtml and write back the result as the response. 4. Office importer wysiwyg plugin in turn takes the result and put it into the wysiwyg editor. And the second problem arises when there are non-textual content (ex. images) in the document submitted. In this case, office importer servlet must attach these files into the wiki page which is being edited. Now, if the user decides to cancel the whole edit operation just after the import operation, there must be a way to remove those attachments. How can we do this? (For the moment I don't know how to handle this case) Please let me know if you have any comments :) Thanks. - Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

