<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>Hi Paul,
I think, you have to implement your own xml content handler for that. Your Xml content handler should extend the default xml content handler org.opencms.xml.content.CmsDefaultXmlContentHandler.java. But, your handler should
overwrite the method resolveMapping(). In this method you have to implement your logic, that for some properties the plain text is mapped only. With the method CmsHtmlExtractor.extractText() you get the plain text. The XML
content handler to use must be specified in the appinfo section of the XSD defining the XML content:
<xsd:annotation>
<xsd:appinfo>
<handler class="mypackage.myContentHandler" />
...
Please note, that your own xml content handler should be in your own module. Otherwise it is overwritten after an OpenCms update.
</pre>
<pre class="moz-signature" cols="72">--
Kind Regards,
Mario.
-------------------
Mario Jäger
Alkacon Software GmbH - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a></pre>
<br>
Am 14.09.2010 12:49, schrieb Paul-Inge Flakstad:
<blockquote
cite="mid:4D405B4872E4E54A95966E6CF909E7F32659374347@ANTON.nett.npolar"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta content="MSHTML 6.00.6000.17080" name="GENERATOR">
<div><span class="250104310-14092010"><font face="Arial" size="2">Hi
all,</font></span></div>
<div><span class="250104310-14092010"></span> </div>
<div><span class="250104310-14092010"><font face="Arial" size="2">Is
there an easy way to map an OpenCmsHtml element as plain
text to a property?</font></span></div>
<div><span class="250104310-14092010"></span> </div>
<div><span class="250104310-14092010"><font face="Arial" size="2">I
have an ingress field (type OpenCmsHtml) mapped to the
Description property, and I want the property to
contain only the plain text, not the HTML markup.</font></span></div>
<div><span class="250104310-14092010"></span> </div>
<div><span class="250104310-14092010"><font face="Arial" size="2">Best
regards,</font></span></div>
<div><span class="250104310-14092010"><font face="Arial" size="2">Paul</font></span></div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></pre>
</blockquote>
</body>
</html>