{"id":16994930,"url":"https://github.com/jackadams/meteor-html2docx","last_synced_at":"2026-07-22T11:01:25.727Z","repository":{"id":33433566,"uuid":"37078878","full_name":"JackAdams/meteor-html2docx","owner":"JackAdams","description":null,"archived":false,"fork":false,"pushed_at":"2016-06-30T04:50:10.000Z","size":8,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T12:39:57.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackAdams.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-08T16:30:24.000Z","updated_at":"2022-07-20T23:37:16.000Z","dependencies_parsed_at":"2022-07-27T15:32:00.246Z","dependency_job_id":null,"html_url":"https://github.com/JackAdams/meteor-html2docx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JackAdams/meteor-html2docx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackAdams%2Fmeteor-html2docx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackAdams%2Fmeteor-html2docx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackAdams%2Fmeteor-html2docx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackAdams%2Fmeteor-html2docx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackAdams","download_url":"https://codeload.github.com/JackAdams/meteor-html2docx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackAdams%2Fmeteor-html2docx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35759166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T03:47:05.472Z","updated_at":"2026-07-22T11:01:25.691Z","avatar_url":"https://github.com/JackAdams.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"HTML to docx\n------------\n\nMeteor package for creating `.docx` files on the client from html.\n\n#### Quick start\n\n`meteor add babrahams:html2docx`\n\nTo create a link that triggers the download of a specified element as a `.docx` file:\n\n`{{\u003e html2docx selector=\"#target-element\"}}`\n\nwith\n\n`\u003cdiv id=\"target-element\"\u003e\u003cstrong\u003eHTML\u003c/strong\u003e to be turned into a docx file\u003c/div\u003e`\n\n(the `selector` parameter is required)\n\n#### Options\n\nWhen initiating the widget, use these parameters to configure it:\n\n`linkText=\"Download\"` changes the text of the link (default is \"Download as Word document\")\n\n`linkClass=\"my-class-for-links\"` puts a custom class attribute on the link (users of Bootstrap might use `btn` here)\n\n`linkStyle=\"text-decoration: none;\"` puts a custom style attribute on the link\n\n`linkTitle=\"Download as Word document\"` puts a title attribute on the link\n\n`css=\"h1 { color: red; }\"` adds a custom set of css rules to the `.docx` file that is generated\n\n`filename=\"my_word_doc\"` changes the name of the downloaded file (default is \"export\")\n\n`includeStylesheets=false` means there will be no attempt to include css from the application's stylesheets (default is `true`)\n\n`useDocNotDocx=true` produces `.doc` file instead of a `.docx` file (added because Word 2016 won't open html files with extension changed to `.docx` but it will open `.doc` files made this way)\n\n#### Warning\n\nThis is not going to work in all browsers.  See [this post](http://www.effectiveui.com/blog/2015/02/23/generating-a-downloadable-word-document-in-the-browser/) (from which inspiration for this package was drawn), and note that this package only uses the `download` attribute of the `\u003ca\u003e` tag. This will probably only work with recent versions of Chrome and Firefox.\n\nApplication styles will not appear in the `.docx` file as they appear in the app. To quote from the post above:\n\n\"Word supports a small, outdated subset of CSS. Properties such as `background-color`, `color`, `font-size`, `font-weight`, `text-align`, `margin`, and `padding` are supported. CSS3 selectors, as well as properties like float and position don’t work. You can give elements `class` and `id` attributes to target with a stylesheet.\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackadams%2Fmeteor-html2docx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackadams%2Fmeteor-html2docx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackadams%2Fmeteor-html2docx/lists"}