html2openxml icon indicating copy to clipboard operation
html2openxml copied to clipboard

Wrong table creation

Open advapiIT opened this issue 6 years ago • 5 comments

Hello, I've got some issue with HTML Table and Docx creation... in particular I've attached you a demo project that shows the behavior (I've been unable to upload on git since I got error from this machine)

https://drive.google.com/open?id=1dTsMoPqBHzgrbbZbvLRp_KMnojAHNeik

What happens is that the content I've inside the content.html is ok (in real case this data is taken from DB), btw the HTML is correct and it shows fine.

After I add it to the document I got this result

image

instead of

image

What am I doing wrong? Thanks

P.S. I'm using your latest version

advapiIT avatar Apr 03 '18 19:04 advapiIT

Hi,

Thank you for your project, it helped me out to troubleshoot. I see that you are using the style "background". Could you try with background-color instead please? This will fix your problem. I will keep this issue open to remember to handle just "background"

onizet avatar Apr 04 '18 08:04 onizet

Hello ozinet, Thanks for your fast reply, your suggestion works but consider I get this HTML from a WYSIWYG editor and I think I can't pilot it directly... what comes to my mind is to replace in the text background with background-color with a Replace... but I've not understood, do you plan to fix it? have u got a ETA? Thanks

advapiIT avatar Apr 04 '18 09:04 advapiIT

I work on this project as best effort. So if you want to submit me a PR, I will be very happy :)

onizet avatar Apr 04 '18 15:04 onizet

Ok man, I'll try to do it this evening later... Thanks!

On Wed, Apr 4, 2018 at 5:18 PM, Olivier Nizet [email protected] wrote:

I work on this project as best effort. So if you want to submit me a PR, I will be very happy :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/onizet/html2openxml/issues/29#issuecomment-378638617, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeQprJ5DP2RwMmhMv2HBP9Uw8LxX7zgks5tlORigaJpZM4TFrkj .

advapiIT avatar Apr 04 '18 15:04 advapiIT

Excuse me, The feedback you gave me permitted me to go ahead with testing... With this file the result is a mess...is it due to the fact that the HTML I got is from MSWord as well?

content_2.zip Thanks

advapiIT avatar Apr 05 '18 19:04 advapiIT