{"id":13532295,"url":"https://github.com/Nigel2392/wagtail_word","last_synced_at":"2025-04-01T20:31:46.900Z","repository":{"id":223459452,"uuid":"760384353","full_name":"Nigel2392/wagtail_word","owner":"Nigel2392","description":"Easily upload your word documents to Wagtail as pages","archived":false,"fork":false,"pushed_at":"2024-02-22T08:42:44.000Z","size":135,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T07:03:13.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nigel2392.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-20T10:16:21.000Z","updated_at":"2024-12-18T04:02:52.000Z","dependencies_parsed_at":"2024-02-27T22:58:22.693Z","dependency_job_id":null,"html_url":"https://github.com/Nigel2392/wagtail_word","commit_stats":null,"previous_names":["nigel2392/wagtail_word"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nigel2392%2Fwagtail_word","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nigel2392%2Fwagtail_word/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nigel2392%2Fwagtail_word/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nigel2392%2Fwagtail_word/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nigel2392","download_url":"https://codeload.github.com/Nigel2392/wagtail_word/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709923,"owners_count":20821297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-08-01T07:01:09.810Z","updated_at":"2025-04-01T20:31:41.882Z","avatar_url":"https://github.com/Nigel2392.png","language":"Python","funding_links":[],"categories":["Apps"],"sub_categories":["Misc"],"readme":"wagtail_word\n============\n\nA Wagtail module to display Word documents in the frontend.\nConverts your word documents to richtext for easy editing in the Wagtail admin.\n\n**Currently supported filetypes:**\n- .docx\n- .doc\n\n**Currently supported content:**\n- Text (Bold, underlines, italic, strikethrough)\n   - Text suports colors with allow_styling=True\n   - Colors get reset after saving the page in Wagtail admin for a second time.\n- Images\n- Tables\n- Hyperlinks\n- Lists\n   - All will be converted to bullet points\n   - Single level lists only\n\nQuick start\n-----------\n\n1. Add 'wagtail_word' to your INSTALLED_APPS setting like this:\n\n   ```\n   INSTALLED_APPS = [\n   ...,\n   'wagtail_word',\n   ]\n   ```\n2. Simply go to your Wagtail Admin.\n3. Create a new Word Page.\n4. Upload a file in the File field.\n5. Save or publish the page and see the magic!\n\nBase Class\n-----------\nWe provide a base class to extend from. This class will provide you a predefined FieldPanel for the File, has the allow_styling attribute and a custom method to set the content to the right field for you to override.\n\n```python\n# Example class\nclass WordDocumentPage(BaseWordDocumentPage):\n    template = 'wagtail_word/page.html'\n\n    content = RichTextField(\n        blank=True,\n        null=True,\n        features=[\n            # Minimal required features for richtext\n            \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \n            \"bold\", \"italic\", \"ol\", \"ul\", \"link\" \"image\", \"embed\", \n            \"blockquote\",\n        ]\n    )\n\n    edit_panels = [\n        FieldPanel('content'),\n    ]\n\n    edit_handler = TabbedInterface([\n        ObjectList(BaseWordDocumentPage.content_panels, heading=_('Upload')),\n        ObjectList(edit_panels, heading=_('Edit')),\n        ...\n    ])\n    \n    # Override this method to set the content to the right field\n    def set_content(self, content: str):\n        self.content = content\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNigel2392%2Fwagtail_word","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNigel2392%2Fwagtail_word","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNigel2392%2Fwagtail_word/lists"}