Michael Williamson
Forum Replies Created
-
Forum: Plugins
In reply to: [Mammoth .docx converter] Turn H1 into TitlesNo, I’m afraid that’s not currently supported.
Forum: Plugins
In reply to: [Mammoth .docx converter] Just hangs – no messages, no importDoes this happen with all documents? If you try a small document with just one sentence of text in it, what happens?
What browser, version and operating system are you using? Do you get the same problem if you try a different browser?
Just to check: when you say there are no messages, you mean that there are no messages showing up in the “Messages” tab in the Mammoth plugin?
If you open the developer tools by hitting F12 and look at the “Console” tab, are there any errors after attempting to import?
Forum: Reviews
In reply to: [Mammoth .docx converter] Mammoth .docx Converter Not Working ProperlyDo you have any example documents that you can share to help debug the issue?
Forum: Plugins
In reply to: [Mammoth .docx converter] style ‘blockquote’ not recognizedI’d check whether there are any messages being outputted by Mammoth, in particular messages about unrecognised style names. I’d also check whether the preview HTML has any blockquotes, rather than the post itself.
Forum: Plugins
In reply to: [Mammoth .docx converter] Line centering; tabbingExact formatting, such as paragraph alignment, isn’t copied. Instead, Mammoth looks at the styles applied and converts that to the appropriate HTML.
Tabs are converted to tab characters. How those are then rendered by the browser will depend on where they appear: outside of pre elements and similar, tabs will behave in the same way as any other whitespace i.e. be rendered as a single space.
Forum: Plugins
In reply to: [Mammoth .docx converter] Google Docs Heading Tags Include Anchor LinksThose anchor tags will appear when there are bookmarks in the source document. Removing them from the source document should prevent the anchor tags from appearing in the converted HTML.
Forum: Plugins
In reply to: [Mammoth .docx converter] Email or API?There are a number of implementations of Mammoth in various languages that can be used both as libraries and CLIs. For instance, this WordPress plugin uses the JavaScript implementation:
https://github.com/mwilliamson/mammoth.js
That just handles the conversion from docx to HTML though: you’ll need to handle the other parts yourself.
No, I’m afraid Mammoth only supports docx files.
Forum: Plugins
In reply to: [Mammoth .docx converter] Image not showing after conversionWhat’s the URL before your edit, and the URL after your edit?
Forum: Plugins
In reply to: [Mammoth .docx converter] Mammoth adds random “id element” htmlThat’s probably because you have bookmarks in your original document. If you get rid of the bookmarks, the corresponding anchors should disappear.
Forum: Plugins
In reply to: [Mammoth .docx converter] QuotesIf I’ve understood correctly, then the intended use of Mammoth would be to make sure that you’ve applied an appropriate paragraph style in Word to the quote, and then to use an embedded style map in the document to convert that paragraph style to the appropriate HTML, which will depend on your WordPress theme.
For instance, if the paragraph style is called “Quote” and you want to map that to a blockquote tag, you can use the style mapping:
p[style-name='Quote'] => blockquote > p:fresh
Forum: Plugins
In reply to: [Mammoth .docx converter] preserve empty paragraphsI’m afraid this isn’t something you can currently configure in the WordPress plugin.
I’m afraid I’m not familiar with the plugin, so can’t offer any advice.
Forum: Plugins
In reply to: [Mammoth .docx converter] QuotesSorry, I’m not sure what you’re asking for. Could you explain a bit more what document you’re starting with, and what output you expect versus what you’re currently getting?
Forum: Plugins
In reply to: [Mammoth .docx converter] error while attempting to convert fileGiven that things were working fine previously, my suspicion would be an interaction with a plugin that’s been updated.
If you’re able to post minimal reproduction steps from a fresh WordPress installation, then I’ll take a look when I get a chance, otherwise it’s tricky to narrow down the issue without being able to eliminate causes such as other plugins.