Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ckeditor值和Jquery_Jquery_Ckeditor - Fatal编程技术网

Ckeditor值和Jquery

Ckeditor值和Jquery,jquery,ckeditor,Jquery,Ckeditor,我似乎无法从我的电脑中获得价值,有什么想法我哪里出了问题吗 <textarea class="ckeditor" id="Source"></textarea> <a href="javascript:void(0);" onclick="SendPreview()" class="pOrange"> Send</a> 您所做的一切都是有效的,问题在于您正在将CKEditor的值设置为值变量,但在模型中使用源。试试这个: var value

我似乎无法从我的电脑中获得价值,有什么想法我哪里出了问题吗

<textarea  class="ckeditor" id="Source"></textarea> 
<a href="javascript:void(0);" onclick="SendPreview()" class="pOrange"> Send</a>

您所做的一切都是有效的,问题在于您正在将CKEditor的值设置为
变量,但在
模型中使用
。试试这个:

var value = CKEDITOR.instances['Source'].getData();
var model = { 
    EmailBody: value, // <-- Change this
    EmailTo: "email@email.com",
    EmailSubject: $(".Subject").val() 
};
var value=CKEDITOR.instances['Source'].getData();
变量模型={

EmailBody:value,//检查以下内容,这可能有助于您获得解决方案

var value = CKEDITOR.instances['Source'].getData();

    //or
    $('#Source').ckeditor(function( textarea ){
      $(textarea).val();
    });

$(“#ckeditior containerid”).val();Ta,继续获取“500(内部服务器错误)”tho,是因为它的html在值中吗?是的,我想是这样。如果使用ASP MVC,则需要将
[ValidateInput(false)]
属性。如果您使用其他技术,我肯定也有类似的方法,但我不熟悉这些方法。