CKEditor input not printable

0
I have a documentation that i print from Mendix using a document template. All the data in the documentation is entered via CKEDitor. Printing it usually works, but now I have managed to enter something causing a printing error: Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:block" is not a valid child of "fo:table-row"! (See position 339:194). Is there a way to prevent CKEditor entering incorrect input for printing?
asked
2 answers
1

With printing you mean generating a document using the document templates? Have you tried cleaning/sanitizing your HTML before you generate the document?

The community commons module provides a great tool for this in the form of the XSSSanitize Java Action. Try the "Anything goes" policy (input parameter). The string returned by the Java Action should be safe to use in a document template with render XHTML set to true.

answered
0

Dennis' idea is the one you should perform to resolve this problem, but I just wanted to give some context on the problem.

As you've probably seen when developing pages in the document template component you're using a lot of tables. Just as with the the page builder (where layouts and container eliminate most usage of tables), having too many tables can be problematic. Not everything is supported inside a table. For example you can't put a page break inside a table.
I've had this problem as well, and for my solution I disabled several html elements in the editor. For this I had to add additional properties to the CKEditor, these are still on my github fork but I'll push them to the appstore pretty soon.


Due to the current restriction of having to use tables many of the normal html such as the fo:block (which is likely just a div) are not allowed to be used.
Since the community now as a relative big influence on the next new features the easiest way to get improvements like this on the roadmap is to add and vote for a change like this on the quarterly feature post. I'd vote for bringing the document template builder up par with the page builder.

answered