
grid加一个listener:‘afteredit’:function(e),然后用gridcolModelgetCellEditor(ecolumn, erow)fieldgetRawValue()获取
1、获取CKEditor被选中的内容
var mySelection = CKEDITORinstancesckStemgetSelection();
if (CKEDITORenvie) {
mySelectionunlock(true);
data = mySelectiongetNative()createRange()text;
} else {
data = mySelectiongetNative();
}
2、获取CKEditor纯文本
var stemTxt=CKEDITORinstancesCKEditor1documentgetBody()getText(); //取得纯文本
3、获取CKEditor带HTML标签的文本
var stem = CKEDITORinstancesCKEditor1getData();
设置好它的两个属性即可,例如:
editor: { type: 'validatebox', options: { required: true} }$("#dd")datagrid({columns: [[
//显示的列
{field: 'ID', title: '编号', width: 100, sortable: true, checkbox: true }, field: 'UserName', title: '用户名', width: 100, sortable: true, editor: { type: 'validatebox', options: { required: true} } },
{ field: 'RealName', title: '真实名称', width: 100, editor: { type: 'validatebox', options: { required: true} } }, { field: 'Email', title: '邮箱', width: 100, editor: { type: 'validatebox', options: { required: true} } } ]]
//});
<script type="text/javascript" src="ueditor/editor_configjs"></script>
<script type="text/javascript" src="ueditor/editor_alljs"></script>
<link rel="stylesheet" href="ueditor/themes/default/ueditorcss"/>
<form id="form1" name="form1" method="post" action="testphp">
<div id="myEditor"></div>
<!-- <script type="text/plain" id="myEditor" name="content"></script>
<script type="text/javascript">
var editor = new baidueditoruiEditor();
editorrender("myEditor");
</script>-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<input name="action" type="text" value="add">
<tr>
<td><script type="text/plain" id="myEditor" name="content"> </script>
<script language="javascript">
var editor = new baidueditoruiEditor({ textarea:'content'});
editorrender("myEditor");
</script>
<input type="submit" name="Submit" value="提交" />
</td>
</tr>
</table></form>
<CKEditor:CKEditorControl ID="CKEditorControl1" runat="server">
</CKEditor:CKEditorControl>
string str = CKEditorControl1TextReplace("\"","");
str = strReplace("\'", "\"");
这个str就是你要获取的ckeditor里边的值。。(可能是你没把ckeditor里边的字符转换掉吧。。只要转义应该不会有那样的提示了。。你可以试试看。。。)
<textarea id="txtarea" rows="30" cols="50" runat="server"></textarea>
你这个是客户端控件吧,不需要ClientID,只要textarea的id就可以了
以上就是关于extjs定义的EditorGridPanel 如何获取鼠标点击的某行的某个单元格值全部的内容,包括:extjs定义的EditorGridPanel 如何获取鼠标点击的某行的某个单元格值、获取ckeditor的内容、jquery easyUI中 editor的方法等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)