Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

The Docx to HTML Convert Tool module provides a purely front-end solution powered by mammoth.js to convert content from Docx to HTML. Since CKEditor 5, the 'Paste from Word (Office)' feature has been limited in its free version. This module allows content authors to copy content from a Docx file and paste it into any long text field, preserving as much of the original styling as possible.

Features

  • Front-end solution, no file uploaded to the server.
  • Converted HTML content can be pasted to any long text field
  • Preview converted content rendered with current front theme.
  • Support following styling copied from a docx file.
    • Headings.
    • Lists.
    • Customisable mapping.
    • Tables.
    • Footnotes and endnotes.
    • Images.
    • Bold, italics, underlines, strikethrough, superscript and subscript.
    • Links.
    • Line breaks.
    • Text boxes.
    • Comments.
    • And more to come

Post-Installation

The mammoth.js 1.8.0 has already been included in this module. No need to install it separately.

How to use?

  1. Enable the module.
  2. Navigate to Administration > Configuration > Content authoring > DOCX to HTML Converter, or directly access it via the URL /docx-to-html. Note that the 'Access DOCX to HTML Converter' permission is required.
  3. Choose a Docx file from your local machine. The converted HTML preview will automatically display below, and a 'Copy the HTML' button will appear to copy the entire converted content with HTML styling into the clipboard.

Notes

  • CKEditor 5 has its own tag and attribute restrictions. Some HTML tags or attributes pasted into the editor might be filtered out (e.g., H1 tag, IMG tag). If this happens, check the editor and format settings.
  • When copying HTML codes and pasting them into a Drupal text field, ensure that the target text field and format can sanitise (escape) malicious HTML tags and attributes, such as the Script tag.

Credits

This module is powered by mammoth.js.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Jun 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.0 Stable Jun 24, 2024
1.0.0-rc3 Pre-release Jun 21, 2024
1.0.0-rc2 Pre-release Jun 20, 2024
1.0.0-rc1 Pre-release Jun 20, 2024
1.0.0-beta2 Pre-release Jun 14, 2024
1.0.0-beta1 Pre-release Jun 13, 2024
1.0.x-dev Dev Jun 13, 2024