Can you do complex editing of Word Documents in a browser?

家住魔仙堡 提交于 2019-12-17 16:52:19

问题


A friend of mine wants to have an application where people can upload documents in Word (or text) format, and then allow people to make edits to those documents within a browser.

Is there any mechanism that would support adding text "bubbles" for adding comments? Either floating, or off to the side.

Being able to save back to Word format is a must too. Or at least, some format supported by Word, that would still be editable. Saving it as an image is not acceptable.

I was thinking about opening the Word Document in an FCK Editor window, but FCK only seems to have "normal" inline text editing capabilities (although it is great).

Is this feasible?


回答1:


Yes it is feasible. Google has done that (and it does have comments). So has Adobe. I'm sure there is more.




回答2:


Xopus provides a programmable platform that allows you to define editable XML within a WYSIWYG environment. You could use it to define what you want to edit (XML), against which rules you want to edit it (an XSD) and how you want it to look while you edit it (XSL). Then you tie that all together with the Javascript API.

In other words, you could pretty easily define a document that contains multiple paragraphs with optional comments and then have them displayed as bubbles exactly the way you want them; when saved, a script on the server could be executed that converts the XML to a Word document.

Take a look at the demos.




回答3:


If they are Word 2007 documents, you can use Silverlight. Here's an example application that uses Silverlight to open a Word 2007 document and display it in the browser.

Since StackOverflow is a programmer site, I'll assume you're a programmer. You can use Silverlight to add the bubbles and annotations to a Word 2007 document, but you'll need to know VB.NET or C#.




回答4:


Take a look at docx2web.appspot.com which is (currently) a very bare bones editor with the distinguishing feature that the browser is directly manipulating (more or less) the "flat OPC" version of the docx.

This means that there is no lossy conversion on either the way in or the way out. So for example, when you save after editing, anything which was in the original docx is round tripped back to Word.

As far as support for older .doc is concerned, POI can be used to convert them to .docx (although your mileage may vary).




回答5:


Why are you trying to compete with google docs?

I know that TinyMCE provides some rich controls for in browser editing. Last time i looked at it, it had 100% of the stuff i would normally use in word, and then some. On the other hand, i probably has 1% of the features that MS word provides. It would be VERY difficult to implement it all.

As far as saving to MS word compatible format. i am sure its possible. it would probably be easier to save to a non-doc format. As far as popups etc, those can be easy built using jquery UI or any other javascript framework.

Bottom line: yes, its possible, but why?!




回答6:


It is possible. For example eyeOS has a text processing application able to open and process Microsoft Office and OpenOffice.org text documents.



来源:https://stackoverflow.com/questions/726293/can-you-do-complex-editing-of-word-documents-in-a-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!