Jump to content

Edit Microsoft Word file on website


NotionCommotion

Recommended Posts

Microsoft word documents are not plain "text". The files contain extensive markup text, similar to HTML, to specify properties such as font, color, position, etc. etc. etc. Not only that, but several years back MS made a significant change in the format of that markup. Previously (.doc), it used a MS proprietary format and now (.docx) it uses an XML based format. So, it is not a trivial task to create an on-line editor. Trying to code an editor yourself will be a huge amount of effort and would require that you limit what a user can do. I suspect there are some APIs/Classes available that can do most, if not all, of what you are doing. I would start by doing some Googling for that. But, I suspect that either you would find some free tools that are limited, or you will find more comprehensive tools that cost money.

That sounds like a MS Office replacement application. What you need is a Web based interface that can read the source code of the Word docs, convert it to content that you can represent in a web interface, allow the user to make edits to the content (using features such as bold, color, font (whatever you need), and finally convert that web content back into the format for a word document.

 

Take a look at these search results:

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=php%20microsoft%20word%20library

Probably the easiest thing to do would be to use something like LibreOffice to convert the document to HTML, load it in a TinyMCE instance, then on save convert it back to a word document (assuming that is possible using LibreOffice).

 

That would provide basic editing capabilities, but nothing fancy and may not work with every document. Word allows you to do quite a bit of stuff that doesn't easily translate to a web interface.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.