在SugarCRM中,尝试使用富文本编辑器为使用TinyMCE的字段,它在EditView中正确存储和渲染,但在ListView和DetailView中输出显示标签而不是格式。
在数据库中按预期存储HTML标记。我正在寻找解决方案如何在detailview部分中呈现格式。
详细信息视图
答案 0 :(得分:0)
我找到了在DetailViewDefs.php文件中的customCoce中解码Smarty中的HTML字符的解决方案。
'name'=> 'editor_c', 'studio'=> '可见', 'customCode'=> '{$ fields.editor_c.value | escape:\'htmlentitydecode \'| escape:\'html \'| strip_tags | url2html | nl2br}',