We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi I am trying convert the below mentioned docx file but numbering list is not retaining correctly cp-test.docx
but i am getting like this
HTML response
code snippet let options = { styleMap: [ "p[style-name='Title'] => h1.act-title:fresh", "p[style-name='center'] => center", "p[style-name='Heading 1'] => p:fresh > h1:fresh", "p[style-name='Heading 2'] => p:fresh > h2:fresh", "p[style-name='Heading 3'] => p:fresh > h3:fresh", "p[style-name='Heading 4'] => p:fresh > h4:fresh", "p[style-name='Heading 5'] => p:fresh > h5:fresh", "p[style-name='Heading 6'] => p:fresh > h6:fresh", "p[style-name='Code Block'] => pre:separator('\n')", "p[style-name='Aside Heading'] => div.aside > h2:fresh", "p[style-name='Aside Text'] => div.aside > p:fresh", "u => u", "p[style-name='Numbering'] => div.aside > h2:fresh", ], convertImage: mammoth.images.imgElement(function (image) { return image.read("base64").then(function (imageBuffer) { return { src: "data:" + image.contentType + ";base64," + imageBuffer }; }); }), ignoreEmptyParagraphs: false };
const result = await mammoth.convertToHtml({ buffer: file.data }, options);
The text was updated successfully, but these errors were encountered:
I noticed that you did not include the expected output HTML.
I think that this is what we need.
<ol> <li>Text 1</li> </ol> <p>Some text</p> <ol start="2"> <li>Text 2</li> </ol> <p>Some text</p> <ol start="3"> <li>Text 3</li> </ol>
Sorry, something went wrong.
I noticed that you did not include the expected output HTML. I think that this is what we need. <ol> <li>Text 1</li> </ol> <p>Some text</p> <ol start="2"> <li>Text 2</li> </ol> <p>Some text</p> <ol start="3"> <li>Text 3</li> </ol>
yes you are right
No branches or pull requests
Hi I am trying convert the below mentioned docx file but numbering list is not retaining correctly
cp-test.docx
but i am getting like this
HTML response
code snippet
let options = {
styleMap: [
"p[style-name='Title'] => h1.act-title:fresh",
"p[style-name='center'] => center",
"p[style-name='Heading 1'] => p:fresh > h1:fresh",
"p[style-name='Heading 2'] => p:fresh > h2:fresh",
"p[style-name='Heading 3'] => p:fresh > h3:fresh",
"p[style-name='Heading 4'] => p:fresh > h4:fresh",
"p[style-name='Heading 5'] => p:fresh > h5:fresh",
"p[style-name='Heading 6'] => p:fresh > h6:fresh",
"p[style-name='Code Block'] => pre:separator('\n')",
"p[style-name='Aside Heading'] => div.aside > h2:fresh",
"p[style-name='Aside Text'] => div.aside > p:fresh",
"u => u",
"p[style-name='Numbering'] => div.aside > h2:fresh",
],
convertImage: mammoth.images.imgElement(function (image) {
return image.read("base64").then(function (imageBuffer) {
return { src: "data:" + image.contentType + ";base64," + imageBuffer };
});
}),
ignoreEmptyParagraphs: false
};
The text was updated successfully, but these errors were encountered: