简体   繁体   English

Kendo UI Editor,在带有编码html实体的Editor中显示HTML

[英]Kendo UI Editor, show HTML in Editor with encode html entities

I would like to see HTML in the Kendo UI Editor like 我想在Kendo UI编辑器中看到HTML

 <h1>Hello World</h1> 

How can i do these? 我该怎么办?

My sample show on: https://dojo.telerik.com/ezOPAz/3 我的示例显示在: https : //dojo.telerik.com/ezOPAz/3

  $("#editor").kendoEditor({ value: "<h1>Hello World</h1>", encoded: false, tools: [ "viewHtml" ], deserialization: { custom: function(html) { var encodedStr = html.replace(/[\ -\香<>\\&]/gim, function(i) { return '&#'+i.charCodeAt(0)+';'; }); return encodedStr; } } }); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM