onizet / html2openxml

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments from SharePoint to Word.
MIT License
297 stars 106 forks source link

support for styling ordered/unordered lists and list elements #109

Closed fire-oak closed 2 years ago

fire-oak commented 2 years ago

<ul>, <ol> and <li> elements can now be styled with Word Document styles using the class attribute. an unstyled <li> elements inherits its styling from its parent list element (<ul> or <ol>).

example:

<ul class="CustomList">
    <li>...</li>
    <li class="AlternateListItem">...</li>
    <li>...</li>
</ul>

If CustomList matches a (Word) Document Style, this style will be applied to the paragraphs that are created for every <li> child element of the <ul> list tag. If the <li> element has a class that matches a (Word) Document Style, this inherited behaviour will be overwritten.

In the example above, the paragraph generated for the second <li> element will have the AlternateListItem style applied in Word, while the other two <li> elements will have the CustomList style applied, as inherited by their parent list tag.

onizet commented 2 years ago

Nice, thank you

fire-oak commented 2 years ago

Oh that was quick. When will these changes be available on nuget? in other words, when will be the next release of this nuget package?

onizet commented 2 years ago

it's done