Rich Text Editor and Generate Document

5
Hi, I'm trying to create a Word document with Generate Document. The word doc is created, I'm struggling with the Rich Text fields. Is it possible to use Generate Document and show a Rich Text field, with the markups translated to word equivalents? I tried and got a result like this (without the back slashes () which I added to be able to show it here): <\p><\strong>Agenda:<\/strong><\/p>" <\p>Status update VTWs<\/p> This was what I want to see in the document: Agenda: Status update VTWs Is there a way for me to achieve this? Thanks Toon
asked
4 answers
5

As long it is not dynamic and you do not need to mark a part of the text of an attribute you do not need any markup tags; Try the property Style in the DocumentTemplate in Mendix. Really works great for me to set the style of the attributes used in Word documents.

Mendix is using the property Style in the build up of the form. I was not able to trick that to make it more custom.

answered
4

Hi Toon,

i think it would be an useful feature indeed, so i suggest adding a feature request. It is however a tricky feature as well, since arbitrary HTML might cause all kind of unexpected problems and distort your layout.

answered
4

It would be a nice feature but also one that involves a lot of work rewriting the document generator and converting regular html into the format used for document generation. From your example I don't see any problems with simply using the style attribute in the document template editor though.

answered
2

Hi Michel, Bas,

Yes, I agree, tricky. Moreover, I feel the Rich Text functionality is not complete in that RIch Text information is not always presented correctly. I didn't find the way to present Rich Text information in a grid correctly (without the tags) or in a Tooltip. This limits the usability of the Rich Text functionality severely to my opinion.

Bas, I don't think I can use the style attribute in the document template as I need to style parts of an attribute differently from other parts. The use case is an attribute Information with a meeting report in it complete with headers. In Word I want the same layout.

Thanks for your help. Toon

answered