<xp:inputRichText id="inputRichText1" value="#{doc.body}" readonly="true"> <xp:this.converter> <xp:customConverter> <xp:this.getAsObject><![CDATA[#{javascript:value}]]></xp:this.getAsObject> <xp:this.getAsString><![CDATA[#{javascript: try{ var html=value.toString(); html=html.replace(/<(FONT|font)([ ]([a-zA-Z]+)=(\"|')[^\"\\']+(\"|'))*[^>]+>/g,"") html=html.replace(/(<\/FONT>|<\/font>)/g,"") return html; }catch(e){ print (e); }}]]> </xp:this.getAsString> </xp:customConverter> </xp:this.converter> </xp:inputRichText>