我正在使用 TinyMCE 对用户保存到数据库的内容进行样式设置,用户可以保存的示例如下:
<ol><li><em>This</em> is a <span style="text-decoration: underline;" data-mce-style="text-decoration: underline;">HTML</span> email that <strong><span style="font-family: 'times new roman', times;">should</span></strong> <span style="font-family: tahoma, arial, helvetica, sans-serif;">contain</span> different <span style="font-family: arial, helvetica, sans-serif;">fonts</span> in weights with lists and links...</li></ol>
我目前正在使用ng-bind-html
在我的视图中显示此 HTML 内容,但是,它似乎正在剥离内联样式。这是我的浏览器来源:
<ol><li><em>This</em> is a <span>HTML</span> email that <strong><span>should</span></strong> <span>contain</span> different <span>fonts</span> in weights with lists and links...</li></ol>
有没有办法可以将这些内联样式保留在视图中?