Cleditor富文本框位于精美框内,第一次单击时工作正常,第二次不可编辑 [英] Cleditor richtext box is inside fancy box, it work fine when first click, Second time it not does editable

查看:79
本文介绍了Cleditor富文本框位于精美框内,第一次单击时工作正常,第二次不可编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Cleditor工作,
我想在选择表时从数据库插入数据,当
时工作正常 文档加载,但是在第二次局部视图或Ajax调用中,它在可编辑模式下不起作用,也无法显示从数据库获取的详细信息.

I am working in Cleditor,
i want to insert a data from database when table is selected it works fine when
document load, but in partial view or ajax call in second time it does not work in editable mode, and also not able to display the details get from database.

 $("#edit_template").live('click', function () {
                $("#add_temp").show();//--> display the div inside 
//#teditor is textarea
                $("#teditor").cleditor({ width: 500, height: 470,
                    controls: "bold italic underline strikethrough subscript superscript | font size " +
                    "style | color highlight removeformat | bullets numbering | outdent " +
                    "indent | alignleft center alignright justify | undo redo | " +
                    "rule link image unlink | cut copy paste pastetext | print source", updateTextArea: "new text to set"
                })[0].clear().execCommand("inserthtml", area, null, null);
 $("#teditor").val(data.objtemplate.templatecontent);
});

推荐答案

(" ).live(点击'
("#edit_template").live('click', function () {


( #add_temp ").show(); ->在中显示div // #teditor是textarea
("#add_temp").show();//--> display the div inside //#teditor is textarea


(" ).cleditor({width: 500 ,高度: 470 , 控件:" + " + " + " ,updateTextArea:" 要设置的新文本" })[ 0 ].clear().execCommand(" inserthtml",区域,);
("#teditor").cleditor({ width: 500, height: 470, controls: "bold italic underline strikethrough subscript superscript | font size " + "style | color highlight removeformat | bullets numbering | outdent " + "indent | alignleft center alignright justify | undo redo | " + "rule link image unlink | cut copy paste pastetext | print source", updateTextArea: "new text to set" })[0].clear().execCommand("inserthtml", area, null, null);


这篇关于Cleditor富文本框位于精美框内,第一次单击时工作正常,第二次不可编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆