carbone icon indicating copy to clipboard operation
carbone copied to clipboard

How to render HTML text on Document?

Open CarlosMC opened this issue 8 years ago • 6 comments

Hi All, thanks for the great work you've done here! I wondering if it's possible somehow to render HTML text on a document template. I have HTML text stored from a WYSIWYG control. the html text has lists, strong, br.

CarlosMC avatar Sep 15 '17 13:09 CarlosMC

Hi,

thanks for the great work you've done here!

Thank you!

I wondering if it's possible somehow to render HTML text on a document template.

It seems not easy to inject HTML string directly in an ODT or Word template. Maybe Carbone should convert basic HTML to "compatible XML" before injection. I add it to our todo list :+1: but, please, be patient because we are a bit busy currently :blush: (on "Carbone as a Service" project).

As an alternative, you can do an HTML template directly and ask to Carbone to convert it to PDF, ODT, DOCX... but it is not as easy to maintain as a normal Word or ODT template.

dgrelaud avatar Sep 18 '17 06:09 dgrelaud

Hi I have similar problem. I want to insert html codes into html template directly. By the way, html special chars are encoded automatically? Is there any way to disable it?

ahadortiz avatar Mar 06 '18 14:03 ahadortiz

Hi @ahadortiz,

First, thanks for the message. Carbone is encoding 5 characters (& < > ¦ ') to avoid conflicts with the XML parser. You can't disable it. It's not a priority but we will consider the issue. If you have fixed the issue since 2018, we are open for PR :)

steevepay avatar Oct 09 '19 13:10 steevepay

Also really intersted by this feature ... :)

ppulinckx avatar Oct 21 '19 09:10 ppulinckx

same here

menbatisiunissart avatar Mar 02 '21 19:03 menbatisiunissart

same here

pandeysabin avatar May 12 '21 08:05 pandeysabin