Edit raw structured text in web form?
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 (“ and ”). But in the edit form, the typographic elements are being rendered as a quotation mark, not as the original “. Thus, when the editor saves the edited release, the "content" field now contains the typographic quote instead of the raw "“". 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
I think you need to do:: <dtml-var content html_quote>
davelehman@loewen.com wrote:
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?
Yeah, you just need to html-quote the source: <td>Content:</td> <td><textarea class="text" name="content:text" rows="15" cols="62"><dtml-var content html_quote></textarea></td> cheers, Chris
participants (3)
-
Chris Withers -
davelehman@loewen.com -
Simon Michael