Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

.docx support #16

Open
HR opened this issue Apr 26, 2013 · 41 comments
Open

.docx support #16

HR opened this issue Apr 26, 2013 · 41 comments

Comments

@HR
Copy link
Member

HR commented Apr 26, 2013

I found this my microsoft for support on their formats, just download the documentation and you might find something useful. Or decompile and .apk of an android app (i.e. Quickoffice) and look at the java code if it helps.
http://msdn.microsoft.com/en-us/library/cc313118%28v=office.1.2%29.aspx

@ghost ghost assigned HR May 2, 2013
@HR
Copy link
Member Author

HR commented May 2, 2013

I'm going to create a parser for this for v2

@ferndot
Copy link
Member

ferndot commented May 2, 2013

Ok, when we have a significant amount implemented, we can change the milestone.

Note: You probably already know this, but commits for this go to the doc branch (will be merged into the appropriate release branch. Also, files go in resources/doc/.

Thanks!

@HR
Copy link
Member Author

HR commented May 24, 2013

Ok, here we have a js parser that we can use: https://github.com/stephen-hardy/DOCX.js

@ferndot
Copy link
Member

ferndot commented May 24, 2013

Ya, I saw it yesterday, looks perfect :)

@ferndot
Copy link
Member

ferndot commented May 24, 2013

Moving this to 0.2

ferndot pushed a commit that referenced this issue May 25, 2013
@ghost ghost assigned ferndot May 27, 2013
@ferndot
Copy link
Member

ferndot commented Jun 5, 2013

I am working on dropbox right now, anyone want to finish this for me?

Thanks in advance!

@ferndot
Copy link
Member

ferndot commented Jun 11, 2013

Well, this is the last bug. I think we shouldn't delay the release of Firetext anymore, and we already have quite the changelog for 0.2, so if nobody wants to take this I'll move it to 0.3.

Docx files are hard because they are zips, and I have no experience with jszip.

@HR
Copy link
Member Author

HR commented Jul 21, 2013

@Logi0 Can you please finish this?

@HR
Copy link
Member Author

HR commented Jul 29, 2013

Can you @jackd1 finish this please?

@jackd1
Copy link
Member

jackd1 commented Jul 29, 2013

Sure.

@HR
Copy link
Member Author

HR commented Jul 29, 2013

🆒

@jackd1
Copy link
Member

jackd1 commented Jul 30, 2013

I've been working on Implementing this, but I can't seem to get it to work, first I had to fix some programming errors in the docx.js code, and then I finally got it to output something, but the docx file wasn't valid.

@HR
Copy link
Member Author

HR commented Jul 30, 2013

use another docx file, I uploaded a docx in dp in /Firetext

@jackd1
Copy link
Member

jackd1 commented Jul 30, 2013

Ok, that seemed to work, now I have to figure out how to do the opposite and convert html to docx.

@HR
Copy link
Member Author

HR commented Jul 30, 2013

There is a default setting or structure that you should use (have it in resources/docx) that you duplicate everytime a user wants to save and currently only support bold, italic, underline and some other basic types that you would insert into the user docx file encoded into Open XML syntax.

@ghost ghost assigned jackd1 Aug 4, 2013
@HR
Copy link
Member Author

HR commented Aug 19, 2013

@jackd1 how is it going? By when will you finish this?

@jackd1
Copy link
Member

jackd1 commented Aug 19, 2013

Actually, I've just implemented fairly simple reading of docx documents, I'll push that right now.

@HR
Copy link
Member Author

HR commented Aug 19, 2013

Editing shouldn't be much harder to implement

@jackd1
Copy link
Member

jackd1 commented Aug 19, 2013

No, it won't be very hard, I should be able to do that tomorrow, as well as add some more rich text features.

@HR
Copy link
Member Author

HR commented Aug 19, 2013

👍

@ferndot
Copy link
Member

ferndot commented Aug 20, 2013

👍 How did you do this, it stumped me!

@jackd1
Copy link
Member

jackd1 commented Aug 20, 2013

I wrote a custom class to interpret the document per the iso/iec 29500 spec (downloadable at http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html). The load method loads a document from an ArrayBuffer (calling the constructor with an ArrayBuffer does the same thing). The HTMLout method produces html which can be edited and passed back to the HTMLin method (not yet implemented) which updates the document with the new html. Finally, when finished editing, the generate method generates the docx document. I imagine it was hard to read, it was pretty hard to read the spec 😄

@ferndot
Copy link
Member

ferndot commented Aug 20, 2013

Nice :)

@jackd1
Copy link
Member

jackd1 commented Aug 22, 2013

I finally implemented writing to docx, took a little longer than I thought.

jackd1 added a commit that referenced this issue Aug 23, 2013
@HR
Copy link
Member Author

HR commented Aug 23, 2013

Awesome

@HR HR closed this as completed Aug 23, 2013
@HR
Copy link
Member Author

HR commented Aug 23, 2013

We'll enhance this in the future

@jackd1
Copy link
Member

jackd1 commented Aug 23, 2013

Ok, I still need to add a default template for creating new documents, also it only supports text right now.

@HR
Copy link
Member Author

HR commented Aug 23, 2013

Okay, just add a header, a horizontal line and then a paragraph or user can use blank template

@ferndot
Copy link
Member

ferndot commented Aug 29, 2013

Oh, does this work with Dropbox?

@jackd1
Copy link
Member

jackd1 commented Aug 30, 2013

I think it should, have you tested it out?

@ferndot
Copy link
Member

ferndot commented Aug 30, 2013

I can't because of all the RequireJS errors...

@jackd1
Copy link
Member

jackd1 commented Aug 30, 2013

Oh, right, sorry about that, I'll try to get the script working again as soon as possible.

@ferndot
Copy link
Member

ferndot commented Aug 31, 2013

@jackd1 np, I understand :)

@ferndot
Copy link
Member

ferndot commented Sep 14, 2013

@jackd1 if you have time, could you rework docx.js to comply with the new firetext.parsers.parser namespace scheme?

Also, does docx.js support formatting, or is it just plain text?

@ferndot ferndot reopened this Sep 14, 2013
@HR
Copy link
Member Author

HR commented Oct 12, 2013

Is this completed yet? We need to deliver v0.3

@ferndot
Copy link
Member

ferndot commented Oct 27, 2013

Guess we'll try to ship this with 0.4...

@HR
Copy link
Member Author

HR commented Oct 31, 2013

@joshua-s can you please make this compatible with the new namespacing because this is a vital feature which we need to include in v0.3

@ferndot
Copy link
Member

ferndot commented Nov 1, 2013

I would but it isn't really complete. There is only plain text support, no formatting...

@ferndot
Copy link
Member

ferndot commented Nov 1, 2013

Let's release this as a standalone update though, because it is important. Also see #108 which looks like it will be easy.

@ferndot
Copy link
Member

ferndot commented Dec 25, 2014

Another HTML -> DOCX converter: https://github.com/evidenceprime/html-docx-js

@HR HR unassigned jackd1 Dec 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants