Article

coolguys's picture

Displaying HTML Code in eGuide

article
Reads:

935

Score:
0
0
 
Comments:

0

Problem

I was wondering how to display HTML-formatted text in eGuide. I was thinking of using something like http://tinymce.moxiecode.com/ to edit the text - but I suppose
I'll need another frameset in order to make this happen.

Solution

After a bit more digging I've added the following UI handler:

  <xsl:template name="SV_MAFTextAreaEditTD">
    <td class="ValueText">
      <input type="hidden" name="{name}" id="{name}">
        <xsl:attribute 
name="value"><![CDATA[<undefined><nochange></nochange></undefined>]]></xsl:attribute>
      </input>
      <!-- <textarea rows="5" cols="50" id="MAFShow" wrap="hard" 
class="mceEdit" name="_SV_CTRL_{name}" 
onkeyup="updateSvXml('document.forms[0]._SV_CTRL_{name}')"> -->

      <textarea rows="5" cols="50" id="MAFShow" wrap="hard" 
class="mceEdit" name="_SV_CTRL_{name}" 
onkeyup="updateSvXml('document.getElementByID(MAFShow');'">
        <xsl:value-of select="value"/>
      </textarea>
    </td>
  </xsl:template>

The method that tinyMCE uses (http://tinymce.moxiecode.com/tinymce/docs/option_a...)
to copy back the text from their hidden frame to the 'native' frame seems to conflict with what eGuide is doing. So, I think I'll wind up trying the http://tinymce.moxiecode.com/tinymce/docs/option_o...
method and place in there the logic that would otherwise place the
<![CDATA[<undefined><nochange></nochange></undefined>]]> entry in that field, if it had not been changed.

And of course I'll need an iFrame for display ...





User Comments

© 2009 Novell, Inc. All Rights Reserved.