mammoth.js
mammoth.js copied to clipboard
w:sdt to custom element
Hi, I can see that w:sdt element is included in parsing document.xml. Is there a chance to styleMap this element to some different HTML tags?
Could you provide a minimal example document, the HTML you'd expect to see, the HTML you're actually seeing, and the style map you'd like to use?
Hi,
It's docx with developer option text field:
<w:sdt> <w:sdtPr> <w:rPr> <w:noProof/> <w:lang w:eastAsia="sl-SI"/> </w:rPr> <w:id w:val="964228880"/> <w:placeholder> <w:docPart w:val="DefaultPlaceholder_-1854013440"/> </w:placeholder> <w:showingPlcHdr/> <w:text/> </w:sdtPr> <w:sdtContent> <w:p w:rsidRDefault="00221C0B" w:rsidR="00221C0B" w14:textId="3F8B4E21" w14:paraId="6E3135AB"> <w:pPr> <w:rPr> <w:noProof/> <w:lang w:eastAsia="sl-SI"/> </w:rPr> </w:pPr> <w:r w:rsidRPr="00730AFC"> <w:rPr> <w:rStyle w:val="Besedilooznabemesta"/> </w:rPr> <w:t>Click or tap here to enter text.</w:t> </w:r> </w:p> </w:sdtContent> </w:sdt>
So if there is an option to render this as <input name="964228880" type="text">