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

bug: when an image is nested under spans, xml-builder doesn't pick up the img tag #233

Open
nicolasiscoding opened this issue Jan 7, 2024 · 1 comment

Comments

@nicolasiscoding
Copy link
Contributor

nicolasiscoding commented Jan 7, 2024

In the following scenario, the image will not render properly.

<p><span style="font-size: 11pt;"><span style="font-family: Calibri,sans-serif;"><span style="font-size: 12.0pt;"><span style="color: black;"><img src="shortenedbase64string"></span></span></span></span></p>

After triaging, it can be as simple as checking for a vNode here:

} else if (attributes && attributes.type === 'picture') {

but wanted input on the best way to do this to handle more cases.

Locally, I added another "else if" for this use case and ran the buildImage function. It worked as expected in office for desktop, but did not work for libre. Not an urgent bug as we found a workaround but wanted to add the repro steps here.

@nicolasiscoding
Copy link
Contributor Author

nicolasiscoding commented Aug 26, 2024

We have made a hard-fork we maintain here https://www.npmjs.com/package/@turbodocx/html-to-docx

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

1 participant