-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table Formatting #43
Comments
Hello, I have no time to implement them as an option of remark-docx but any contributions are welcome! |
Thanks for responding so quickly. I'm going to put a little time into seeing if there is a workable solution. Thanks again!! |
Okay, I got something working that will suit my needs in the short term. It's not amazing, but it works! Thankfully your code is easy to read and understand! I wanted to leave the changes here in case this is helpful to anyone else. I added a That object looks like this and I added it to the DocxOptions interface:
It is passed in like so:
That object is then passed into the context.
The Table, Row, Cell, and Paragraph constructors then apply the options and styles.
|
Hi all, I need @generalleger 's code as well. Don't you think a PR is needed? I think it's actually an important addition to the package. Without it the table becomes pretty much unusable. Thank you |
Paulo - my code is pretty hacky - and I've since modified again to add a title page based on other data internal to my application. So, the code quality is not good enough for a PR. The code mods I described above should work though. If you can't get it to work, let me know and I'll try to post it to my public GH. |
Hi - Thanks for making this library. It's great! I have a question. I am trying to format a table where the conversion to docx format occurs on the server (node). I am using remark-gfm to create the table, but it has no style. Is it possible to pass docx table styles into remark-docx?
So far, I think
docx
doesn't provide the ability to edit, outside of thepatcher
which only lets you add things. However, I have a table in the middle of the markdown. Also, it doesn't look like docx style options likeparagraphStyles
,default
, ordocument
styles accept options formatting tables. As far as I can tell, it seems like table styles must be passed into docx when the table is creatednew Table
,new Row
, andnew Cell
. So, if I understand everything correctly, if there were to be table styles, they'd have to be applied when the table is created within remark-docx.Any ideas on how that might work? Thanks!
The text was updated successfully, but these errors were encountered: