editor.htmlEncode(text)
把字符串转换为经过 HTML 编码的字符串。
语法
editor.htmlEncode(string)
参数
类型:String
必填。要编码的字符串。
返回值
类型:String
编码后的字符串。
用法示例
var editor1 = new RichTextEditor("#div_editor1");
var htmlcode=editor1.htmlEncode(" so a < b and b < c ");
alert(htmlcode);