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

Request to Port Fix from Old Repo: add em tag to support italic in those cases #44

Closed
shareefalis opened this issue Sep 20, 2024 · 8 comments

Comments

@shareefalis
Copy link
Contributor

Hi there!

We have an app that uses this library, and it would be great to port the changes from the old repo. Currently, I’m using a temporary workaround that resolves the issue by converting the <em> tag to the <i> tag.

Here’s the PR that fixes this, although it was never merged into the old repo:
privateOmega/html-to-docx#226

Thanks!

@shareefalis shareefalis changed the title please port this change for italic support using em tag Request to Port Fix from Old Repo: Converting <em> to <i> Tag Sep 20, 2024
@shareefalis shareefalis changed the title Request to Port Fix from Old Repo: Converting <em> to <i> Tag Request to Port Fix from Old Repo: add em tag Sep 20, 2024
@shareefalis shareefalis changed the title Request to Port Fix from Old Repo: add em tag Request to Port Fix from Old Repo: add em tag to support italic in those cases Sep 20, 2024
@nicolasiscoding
Copy link
Member

Hey- we have support for the italics tag. Are you saying in certain scenarios it is not working @shareefalis ?

https://github.com/TurboDocx/html-to-docx/blob/main/src/helpers/xml-builder.js#L704

@shareefalis
Copy link
Contributor Author

shareefalis commented Sep 21, 2024

Oh thank, i see, yeah it is not not working in some scenario like multiple format on the same line, our dom is structured

Screenshot 2024-09-21I at 8 57 27 AM

here is the the browser rendering
Screenshot 2024-09-21 at 8 59 03 AM

output of the exported docx in microsoft word

Screenshot 2024-09-21 at 9 28 02 AM

@shareefalis
Copy link
Contributor Author

Let me know if there are some more info i can provide to you guys and it is an awesome library btw!

@nicolasiscoding
Copy link
Member

nicolasiscoding commented Sep 21, 2024 via email

@shareefalis
Copy link
Contributor Author

@shareefalis
Copy link
Contributor Author

#45

@nicolasiscoding
Copy link
Member

addressed in #45

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

2 participants