just wanted to share a solution for rich text fiel...
# advancedpdf
d
just wanted to share a solution for rich text field overflowing the page. I needed a way to split the contents without breaking the html. Because of the use or the field I'm expecting minimal html usage (p, br, i, b, ul, ol, etc), I've got away with splitting on <p> and </p> tags. See snippet.
I also tried wrapping this in an attempt/recover block and just printing the whole rich text field in the
<#recover>
block, but errors didn't actually get caught (e.g. if the whole rich text was surrounded in a div, and the start/end tags were separated by the
?split
)
has anyone actually had any success with the <https://freemarker.apache.org/docs/ref_directive_attempt.html|#attempt#recover blocks>?
👀 1