[Zope] Edit raw structured text in web form?

davelehman@loewen.com davelehman@loewen.com
Mon, 20 Jan 2003 13:29:50 -0600


This is a multipart message in MIME format.
--=_alternative 006B151A86256CB4_=
Content-Type: text/plain; charset="us-ascii"

I have a web form that allows editors to add press releases to our 
intranet. The main field is called "content" and is structured text. I can 
render the STX into HTML using:

<dtml-var content fmt=structured-text>

Now, I would like to create an "editForm" to allow the editor to edit the 
press release after it's been created. My form shows the existing content 
field like this:

<td>Content:</td>
<td><textarea class="text" name="content:text" rows="15" 
cols="62"><dtml-var content></textarea></td>

The content can contain proper typographic elements such as quotes 
(&#8220; and &#8221;). But in the edit form, the typographic elements are 
being rendered as a quotation mark, not as the original &#8220;. Thus, 
when the editor saves the edited release, the "content" field now contains 
the typographic quote instead of the raw "&#8220;".

Is there a way to force the raw STX to show up in the editForm textarea 
field (as it does in the ZMI) instead of letting the browser render it 
into it's typographic equivalent? (Hmmm... I suppose if I knew where to 
look, I should be able to find this out by browsing the ZMI source?)

--dave

--=_alternative 006B151A86256CB4_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="Courier New">I have a web form that allows editors to add press releases to our intranet. The main field is called &quot;content&quot; and is structured text. I can render the STX into HTML using:</font>
<br>
<br><font size=2 face="Courier New">&lt;dtml-var content fmt=structured-text&gt;</font>
<br>
<br><font size=2 face="Courier New">Now, I would like to create an &quot;editForm&quot; to allow the editor to edit the press release after it's been created. My form shows the existing content field like this:</font>
<br>
<br><font size=2 face="Courier New">&lt;td&gt;Content:&lt;/td&gt;</font>
<br><font size=2 face="Courier New">&lt;td&gt;&lt;textarea class=&quot;text&quot; name=&quot;content:text&quot; rows=&quot;15&quot; cols=&quot;62&quot;&gt;&lt;dtml-var content&gt;&lt;/textarea&gt;&lt;/td&gt;</font>
<br>
<br><font size=2 face="Courier New">The content can contain proper typographic elements such as quotes (&amp;#8220; and &amp;#8221;). But in the edit form, the typographic elements are being rendered as a quotation mark, not as the original &amp;#8220;. Thus, when the editor saves the edited release, the &quot;content&quot; field now contains the typographic quote instead of the raw &quot;&amp;#8220;&quot;.</font>
<br>
<br><font size=2 face="Courier New">Is there a way to force the raw STX to show up in the editForm textarea field (as it does in the ZMI) instead of letting the browser render it into it's typographic equivalent? (Hmmm... I suppose if I knew where to look, I should be able to find this out by browsing the ZMI source?)</font>
<br>
<br><font size=2 face="Courier New">--dave</font>
<br>
--=_alternative 006B151A86256CB4_=--