Skip to content
New issue

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

Unordered list is converted in ordered list #63

Closed
lacsyst opened this issue Aug 22, 2019 · 4 comments
Closed

Unordered list is converted in ordered list #63

lacsyst opened this issue Aug 22, 2019 · 4 comments

Comments

@lacsyst
Copy link

lacsyst commented Aug 22, 2019

All is in the title

When my html contains an unordered list, this list is converted to ordered list.

`
using (WordprocessingDocument package = WordprocessingDocument.Create(generatedDocument, WordprocessingDocumentType.Document))
{
MainDocumentPart mainPart = package.MainDocumentPart;
if (mainPart == null)
{
mainPart = package.AddMainDocumentPart();
new Document(new Body()).Save(mainPart);
}

                HtmlConverter converter = new HtmlConverter(mainPart);
                converter.ParseHtml(html);

                mainPart.Document.Save();
                docMainPart = mainPart;
            }

`

@lacsyst
Copy link
Author

lacsyst commented Aug 27, 2019

In HtmlConverter.cs file the <ul> tag as the same Action element than <ol> tag (ProcessNumberingList)

{ "<ol>", ProcessNumberingList }, { "<p>", ProcessParagraph }, { "<pre>", ProcessPre }, { "<q>", ProcessQuote }, { "<span>", ProcessSpan }, { "<section>", ProcessDiv }, { "<s>", ProcessHtmlElement<Strike> }, { "<strike>", ProcessHtmlElement<Strike> }, { "<strong>", ProcessHtmlElement<Bold> }, { "<sub>", ProcessSubscript }, { "<sup>", ProcessSuperscript }, { "<table>", ProcessTable }, { "<tbody>", ProcessTablePart }, { "<td>", ProcessTableColumn }, { "<tfoot>", ProcessTablePart }, { "<th>", ProcessTableColumn }, { "<thead>", ProcessTablePart }, { "<tr>", ProcessTableRow }, { "<u>", ProcessUnderline }, { "<ul>", ProcessNumberingList },

@ericadcg
Copy link

ericadcg commented Oct 1, 2020

Hi.
I'm having this same issue and have yet to find a solution.

Do you mind sharing your solution if you have one?

Thanks, Érica.

@ricardodemauro
Copy link

I think this was solved already. I`m using the latest version and I can see differences between those two.

@Archie-Miller
Copy link

Archie-Miller commented May 19, 2023

I know I'm still having this issue. If there is a known way to ensure this works, I'd sure like to know, otherwise I'm going to keep trying to get a ListBullet to work.

I have multilevel lists with both Ordered and Unordered.

@onizet onizet mentioned this issue Apr 19, 2024
@onizet onizet closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants