Giter VIP home page Giter VIP logo

Comments (8)

privateOmega avatar privateOmega commented on June 19, 2024

@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.

hsharma1996 avatar hsharma1996 commented on June 19, 2024

@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.

privateOmega avatar privateOmega commented on June 19, 2024

@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.

hsharma1996 avatar hsharma1996 commented on June 19, 2024

@privateOmega maybe some guidance and I could do that myself with some research ?

from html-to-docx.

privateOmega avatar privateOmega commented on June 19, 2024

@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.

osdiab avatar osdiab commented on June 19, 2024

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.

privateOmega avatar privateOmega commented on June 19, 2024

@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:

image

from html-to-docx.

privateOmega avatar privateOmega commented on June 19, 2024

Closing this issue thread since the feature is supported now.

from html-to-docx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.