tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/14348-wysiwyg-in-data-definition-not-outputting-text-formatting-on-the-pageCascade CMS: Discussion 2016-08-18T15:12:36Ztag:help-archives.hannonhill.com,2010-02-09:Comment/401601582016-06-21T12:52:40Z2016-06-21T12:52:40ZWYSIWYG in Data Definition not Outputting Text Formatting on the Page<div><p>I have a Data Definition with a WYSIWYG for the identifier
"program-description," but when I pull the data on the page it's
not using the formatting I've applied within the WYSIWYG. What am I
doing wrong?</p>
<p>Here is my Data Definition and my Format:</p>
<pre>
<code><system-data-structure>
<text identifier="program-name" label="Program Name" required="true"/>
<text wysiwyg="true" identifier="program-description" label="Program Description" required="true"/>
<group identifier="course-sequence" label="Course Sequence">
<group identifier="student-year" label="Student Year" multiple="true">
<text type="multi-selector" identifier="year" label="Year">
<selector-item value="Freshman" selected="true"/>
<selector-item value="Sophomore"/>
<selector-item value="Junior"/>
<selector-item value="Senior"/>
</text>
<group identifier="student-term" label="Student Term" multiple="true">
<text type="multi-selector" identifier="term" label="Term">
<selector-item value="Fall" selected="true"/>
<selector-item value="Winter"/>
<selector-item value="Spring"/>
</text>
<text identifier="course-1" label="Course 1"/>
<text identifier="course-1-credit" label="Course 1 Credit"/>
<text identifier="course-2" label="Course 2"/>
<text identifier="course-2-credit" label="Course 2 Credit"/>
<text identifier="course-3" label="Course 3"/>
<text identifier="course-3-credit" label="Course 3 Credit"/>
<text identifier="course-4" label="Course 4"/>
<text identifier="course-4-credit" label="Course 4 Credit"/>
<text identifier="course-5" label="Course 5"/>
<text identifier="course-5-credit" label="Course 5 Credit"/>
</group>
</group>
</group>
</system-data-structure></code>
</pre>
<pre>
<code>#set ( $page = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page") )
#set ( $data = $page.getChild("system-data-structure") )
#set ( $progName = $data.getChild("program-name") )
#set ( $progDesc = $data.getChild("program-description") )
<h2>$_EscapeTool.xml($progName.value)</h2>
<p>$_EscapeTool.xml($progDesc.value)</p></code>
</pre></div>voltmer1tag:help-archives.hannonhill.com,2010-02-09:Comment/401601582016-06-21T14:33:59Z2016-06-21T14:33:59ZWYSIWYG in Data Definition not Outputting Text Formatting on the Page<div><p>Hi,</p>
<p>Most likely, you'll need to use the $_SerializerTool object to
serialize the HTML markups.<br>
See <a href="http://www.upstate.edu/cascade-admin/formats/velocity/course/lesson07.php">
http://www.upstate.edu/cascade-admin/formats/velocity/course/lesson...</a></p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/401601582016-06-22T12:51:28Z2016-06-22T12:51:28ZWYSIWYG in Data Definition not Outputting Text Formatting on the Page<div><p>Wing is correct. Specifically, you would want to adjust this
line in your Format:</p>
<pre>
<code><p>$_EscapeTool.xml($progDesc.value)</p></code>
</pre>
<p>to be the following:</p>
<pre>
<code>$_SerializerTool.serialize($progDesc, true)</code>
</pre>
<p>More information about the Serializer Tool can be found <a href="http://www.hannonhill.com/kb/Script-Formats/#serializer-tool">here</a>.</p>
<p>Please let us know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/401601582016-08-17T15:11:41Z2016-08-17T15:11:41ZWYSIWYG in Data Definition not Outputting Text Formatting on the Page<div><p>Thanks guys! You can close this.</p></div>voltmer1tag:help-archives.hannonhill.com,2010-02-09:Comment/401601582016-08-18T15:12:33Z2016-08-18T15:12:33ZWYSIWYG in Data Definition not Outputting Text Formatting on the Page<div><p>Not a problem at all. Glad to hear we were able to help point
you in the right direction.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Have a great day!</p></div>Ryan Griffith