>1 docxHtml helper calls with html lists break lists indentation



  • Hello!
    I'm iterating through array of objects in my template using {{#each.. and displaying some HTML info that contains marked list inside using {{docxHtml content=SomeHtml}}... And the issue is that if display HTML that contains some marked list more than once, all displayed lists in the report are broken (indentation is missed everywhere except 1st level nesting list items). Like if only one object has HTML info with a list and others are having only plain text, it looks perfect
    Other weird thing is that I couldn't reproduce it in the playground :(
    But as for example: https://playground.jsreport.net/w/GoncharovNikit/yMmdVac~
    Example from my env:

    3 docxHtml prints and only first one with the list (looks perfect):
    0_1726818873303_upload-bfb765cd-d25f-4c42-9d0e-9e29812e552e

    Now adding some marked list for the second print:
    Should look like:
    0_1726819131329_upload-781b4b0b-7e11-496b-bdd7-571bdd6a3d10

    Eventual render with 2 lists:
    0_1726819152173_upload-873282dc-b023-401a-90b4-5200c0b60b02

    As you can see indentation is correct only for 1st level list items
    Could you help please?


  • administrators

    hi!

    I'm iterating through array of objects in my template using {{#each.. and displaying some HTML info that contains marked list inside using {{docxHtml content=SomeHtml}}... And the issue is that if display HTML that contains some marked list more than once, all displayed lists in the report are broken (indentation is missed everywhere except 1st level nesting list items). Like if only one object has HTML info with a list and others are having only plain text, it looks perfect
    Other weird thing is that I couldn't reproduce it in the playground :(
    But as for example: https://playground.jsreport.net/w/GoncharovNikit/yMmdVac~

    playground runs jsreport 4.3.0 so it is expected there is some differences if you are testing with latest version. you don't mention what version you are using but i assume you are using latest.

    the example you shared on playground seems to run fine as expected, on my local with jsreport 4.6.0.

    0_1726847324252_Screenshot 2024-09-20 at 10 .48.27@2x.jpg

    the case you are describing from your env looks different from what you shared, so it will be easier to take a look if you provide an export file or a new playground with the same setup you are describing.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.