In your jx template you can define something like: <?xml version="1.0" encoding="UTF-8"?> <jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0"> <html> … <cinclude:include src="cocoon:/dbrecord/${recordId}"/> … </html> </jx:template> And next you need to add the include transformer to that pipeline. So you would end up with something like: <map:match pattern="dbrecord/*"> <map:generate src="dbrecord.jx" type="jx"/> <map:transform type="cinclude"/> <map:serialize type=”xhtml”/> </map:match> Cheers, Robby Pelssers From: Bart Remmerie [mailto:[email protected]] Sent: Thursday, May 27, 2010 12:13 PM To: users Subject: from wysiwyg-editor to database and/or nice html-output Hi,
One way or another, I can't get this working ... and I guess I'm overlooking an easy essential bit: in a CForm, I use an htmlarea-editor to allow users to create input with basic markup (bold, underline, italic, ...) When I store the information in a database, it looks like a nice html-snippet, something like this: This is <span style="font-style: italic;"><span style="font-weight: bold;">a simple </span>test</span> What I'm struggling with is how to get this text integrated into a jx-page or in a CForm-field with an output-state in the desired way: Not with the markup visible Not with the markup replaced by < > ... But simply the text, with the markup applied (for the sample above partially bold and italic). Someone must have done this before I guess. In the application, it should allow the text to be read on the screen & used as basis (template) for emails too. Kind regards, Bart
