WYSIWYG in Data Definition not Outputting Text Formatting on the Page

voltmer1's Avatar

voltmer1

21 Jun, 2016 12:52 PM

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?

Here is my Data Definition and my Format:

<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>
#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>
  1. 1 Posted by Wing Ming Chan on 21 Jun, 2016 02:33 PM

    Wing Ming Chan's Avatar

    Hi,

    Most likely, you'll need to use the $_SerializerTool object to serialize the HTML markups.
    See http://www.upstate.edu/cascade-admin/formats/velocity/course/lesson...

    Wing

  2. 2 Posted by Ryan Griffith on 22 Jun, 2016 12:51 PM

    Ryan Griffith's Avatar

    Wing is correct. Specifically, you would want to adjust this line in your Format:

    <p>$_EscapeTool.xml($progDesc.value)</p>
    

    to be the following:

    $_SerializerTool.serialize($progDesc, true)
    

    More information about the Serializer Tool can be found here.

    Please let us know if you have any questions.

    Thanks!

  3. 3 Posted by voltmer1 on 17 Aug, 2016 03:11 PM

    voltmer1's Avatar

    Thanks guys! You can close this.

  4. 4 Posted by Ryan Griffith on 18 Aug, 2016 03:12 PM

    Ryan Griffith's Avatar

    Not a problem at all. Glad to hear we were able to help point you in the right direction.

    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.

    Have a great day!

  5. Ryan Griffith closed this discussion on 18 Aug, 2016 03:12 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM