SugarCRM,在DetailView中以HTML格式显示数据

时间:2014-08-18 03:40:48

标签: php tinymce richtextbox sugarcrm

在SugarCRM中,尝试使用富文本编辑器为使用TinyMCE的字段,它在EditView中正确存储和渲染,但在ListView和DetailView中输出显示标签而不是格式。

在数据库中按预期存储HTML标记。我正在寻找解决方案如何在detailview部分中呈现格式。

enter image description here

详细信息视图

enter image description here

1 个答案:

答案 0 :(得分:0)

我找到了在DetailViewDefs.php文件中的customCoce中解码Smarty中的HTML字符的解决方案。

'name'=> 'editor_c',         'studio'=> '可见',    'customCode'=> '{$ fields.editor_c.value | escape:\'htmlentitydecode \'| escape:\'html \'| strip_tags | url2html | nl2br}',