Giter VIP home page Giter VIP logo

Comments (4)

orasik avatar orasik commented on June 19, 2024 2

Thanks @privateOmega
My specific case was just to align an image to the right.

Here is the code:

<img src="data:image/png;base64, {content}" style="width:250px;text-align:right" />

text-align is not a valid CSS for <img> but it worked fine when I exported the docx file.

from html-to-docx.

privateOmega avatar privateOmega commented on June 19, 2024

@orasik Unfortunately, there isn't any equivalent of div in OOXML standards, so we skip div as a whole, at present I don't have any alternative suggestions on this other than translate styles to inner elements if possible.

from html-to-docx.

orasik avatar orasik commented on June 19, 2024

@privateOmega Thank you for your reply.
I found a workaround and that is by using style="text-align:right" inside <img>
I am happy to add an example and raise a PR if you agree.

from html-to-docx.

privateOmega avatar privateOmega commented on June 19, 2024

@orasik Well the change that you did was for a very specific case right? i don't think an example of that is required as part of examples, but I guess if you update your entire example along with fix here, that might help as a pointer for new users. I will close this issue, once you post that. Thanks.

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.