Comments (8)
@hsharma1996 Could you please post the input file you are using along with the html-to-docx configuration as a js file, that would help me understand the issue at hand better.
from html-to-docx.
@privateOmega There is nothing wrong with it. I have a lot of ordered lists and unordered lists in the html, I want the numbering to be manually supplied
So what you can see in image is, even though i supplied the numbers(1.0,1.1,1.1.1 etc), it is still taking numbering by default 1 2 3.
from html-to-docx.
@hsharma1996 At present, we don't support this feature, but if somebody could raise a PR for that, I would happily merge it.
from html-to-docx.
@privateOmega maybe some guidance and I could do that myself with some research ?
from html-to-docx.
@hsharma1996 Sure, have at it. Basic Guideline: Fork the repo and create a branch off of develop
, namely like feature/custom-numbering
. I think we should be getting the format as an option and then the numbering fragments should be constructed appropriately. checkout docx-document.js
, there is a method called generateNumberingXML
, which does this with default values. I guess that would serve as a starter.
from html-to-docx.
Related to this - my intended use case is to have nested lists have different list style types.
For example,
1. foo
2. bar
a. baz
b. foo
i. bar
ii. baz
This is relatively easy to express with style tags, so I'm thinking it would be sufficient for me if this library supported the list-style-type
rule.
from html-to-docx.
@osdiab Yes it does,
html input:
<ol style="list-style-type:decimal;">
<li>foo</li>
<li>bar
<ol style="list-style-type:lower-alpha;">
<li>baz</li>
<li>foo
<ol style="list-style-type:lower-roman;">
<li>bar</li>
<li>baz</li>
</ol>
</li>
</ol>
</li>
</ol>
Output looks like this:
from html-to-docx.
Closing this issue thread since the feature is supported now.
from html-to-docx.
Related Issues (20)
- How to resize images - is it possible?
- Images & style doesn't apply well in .docx file HOT 4
- html to docx conversion raise an error when it transform a table with merged cell
- Margins don't work
- ADD page break if content doesn't have enough room
- XML error when using with Vite (React or Vue)
- browser webpack error
- How to preserve border-bottom without table
- Refactoring work done HOT 4
- bug: when an image is nested under spans, xml-builder doesn't pick up the img tag
- README.md does not show how to load the HTMLtoDOCX function HOT 2
- Nested formatting tags are not getting applied
- STRIKE THROUGH Not working HOT 3
- Reference error : ReferenceError: HTMLToDOCX is not defined.
- Uncaught TypeError: Class extends value undefined is not a constructor or null
- ul element not properly displayed HOT 1
- Nuxt 3 (no SSR)+ Vite not working - Cannot read properties of undefined (reading 'prototype')
- Cannot read properties of undefined (reading 'getVNodeKey') HOT 1
- console.warning is not a function
- Module not found: Error: Can't resolve 'encoding' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-to-docx.