[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fx-s4pTbNyjjTZnKfnd6dPQTptGIpvKXJj0JfunF0bkY":3},{"slug":4,"display_name":5,"profile_url":6,"plugin_count":7,"total_installs":8,"avg_security_score":9,"avg_patch_time_days":10,"trust_score":11,"computed_at":12,"plugins":13},"michaelwilliamson","Michael Williamson","https:\u002F\u002Fprofiles.wordpress.org\u002Fmichaelwilliamson\u002F",1,30000,100,30,94,"2026-04-04T15:29:54.197Z",[14],{"slug":15,"name":16,"version":17,"author":5,"author_profile":6,"description":18,"short_description":19,"active_installs":8,"downloaded":20,"rating":21,"num_ratings":22,"last_updated":23,"tested_up_to":24,"requires_at_least":25,"requires_php":26,"tags":27,"homepage":33,"download_link":34,"security_score":9,"vuln_count":35,"unpatched_count":35,"last_vuln_date":36,"fetched_at":37},"mammoth-docx-converter","Mammoth .docx converter","1.22.0","\u003Cp>Mammoth is designed to convert .docx documents, such as those created by Microsoft Word, Google Docs and LibreOffice, and convert them to HTML. Mammoth aims to produce simple and clean HTML by using semantic information in the document, and ignoring other details. For instance, Mammoth converts any paragraph with the style \u003Ccode>Heading1\u003C\u002Fcode> to \u003Ccode>h1\u003C\u002Fcode> elements, rather than attempting to exactly copy the styling (font, text size, colour, etc.) of the heading. This allows you to paste from Word documents without the usual mess.\u003C\u002Fp>\n\u003Cp>There’s a large mismatch between the structure used by .docx and the structure of HTML, meaning that the conversion is unlikely to be perfect for more complicated documents. Mammoth works best if you only use styles to semantically mark up your document.\u003C\u002Fp>\n\u003Cp>The following features are currently supported:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Cp>Headings.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Lists.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Tables. The formatting of the table itself, such as borders, is currently ignored, but the formatting of the text is treated the same as in the rest of the document.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Footnotes and endnotes.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Images.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Bold, italics, superscript and subscript.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Links.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Text boxes. The contents of the text box are treated as a separate paragraph that appears after the paragraph containing the text box.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4>Embedded style maps\u003C\u002Fh4>\n\u003Cp>By default, Mammoth maps some common .docx styles to HTML elements. For instance, a paragraph with the style name \u003Ccode>Heading 1\u003C\u002Fcode> is converted to a \u003Ccode>h1\u003C\u002Fcode> element. If you have a document with your own custom styles, you can use an embedded style map to tell Mammoth how those styles should be mapped. For instance, you could convert paragraphs with the style named \u003Ccode>WarningHeading\u003C\u002Fcode> to \u003Ccode>h1\u003C\u002Fcode> elements with \u003Ccode>class=\"warning\"\u003C\u002Fcode> with the style mapping:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>p[style-name='WarningHeading'] => h1.warning:fresh\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fmike.zwobble.org\u002Fprojects\u002Fmammoth\u002Fembed-style-map\u002F\" rel=\"nofollow ugc\">An online tool\u003C\u002Fa> can be used to embed style maps into an existing document. Details of \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmwilliamson\u002Fmammoth.js#writing-style-maps\" rel=\"nofollow ugc\">how to write style maps can be found on the mammoth.js documentation\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>A style map to be used for all documents can be set by configuring Mammoth (see below).\u003C\u002Fp>\n\u003Ch4>Configuration\u003C\u002Fh4>\n\u003Cp>Mammoth can be configured by writing a separate plugin. For instance, \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmwilliamson\u002Fmammoth-wordpress-plugin\u002Ftree\u002Fmaster\u002Fexamples\u002Foptions-plugin\" rel=\"nofollow ugc\">this example plugin\u003C\u002Fa> adds a custom style map, and uses a document transform to detect paragraphs of monospace text and converts them to paragraphs with the style “Code Block”.\u003C\u002Fp>\n\u003Cp>As a WordPress plugin, Mammoth uses the JavaScript library mammoth.js to convert documents. Mammoth will use the JavaScript global \u003Ccode>MAMMOTH_OPTIONS\u003C\u002Fcode> whenever calling mammoth.js, which allows for some customisation. \u003Ccode>MAMMOTH_OPTIONS\u003C\u002Fcode> should be defined as a function that returns an options object. This options object will then be passed in as the \u003Ccode>options\u003C\u002Fcode> argument to \u003Ccode>convertToHtml\u003C\u002Fcode>. The \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmwilliamson\u002Fmammoth.js\" rel=\"nofollow ugc\">mammoth.js docs\u003C\u002Fa> describe the various options available.\u003C\u002Fp>\n\u003Cp>The global \u003Ccode>MAMMOTH_OPTIONS\u003C\u002Fcode> will be called with \u003Ccode>mammoth\u003C\u002Fcode> as the first argument. This can be useful if you need to use a function from mammoth.js, such as \u003Ccode>mammoth.transforms.getDescendantsOfType\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch4>FAQs\u003C\u002Fh4>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fmike.zwobble.org\u002Fprojects\u002Fmammoth\u002Ffaqs\u002F\" rel=\"nofollow ugc\">Answers to some frequently asked questions about Mammoth\u003C\u002Fa>.\u003C\u002Fp>\n","Mammoth converts semantically marked up .docx documents to simple and clean HTML, allowing pasting from Word and Google Docs without the usual mess.",445788,96,62,"2026-03-12T23:20:00.000Z","6.9.4","4.0","",[28,29,30,31,32],"docx","html","office","paste","word","https:\u002F\u002Fgithub.com\u002Fmwilliamson\u002Fmammoth-wordpress-plugin","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fmammoth-docx-converter.1.22.0.zip",0,null,"2026-03-15T15:16:48.613Z"]