日期:2014-05-16  浏览次数:20383 次

HtmlEditor保存到数据库的问题
{          xtype:'htmleditor',
            id:'bio',
            fieldLabel:'Biography',
            height:200,
            enableLinks :false,     //这是把链接的按钮去掉.
            enableLists : false,     // 这是把list 排序给去掉,
            value: Ext.util.Format.htmlDecode('<FONT color=#ff0000><U><EM>22</EM></U></FONT>'),
            anchor:'98%'   //上述这个是编码转换..
        }
就是这个编码转换...这是一个html在线编辑器,在对数据库存储时,存储也是基本的html格式代码..
Ext.util.Format.htmlDecode(),,,这个函数,有读取数据库值并显示到页面上时,就起到作用了呢.
另外还有一个函数:Ext.util.Format.htmlEncode()  与上述反作用..