Jquery can';t将值设置为文本编辑器 $(“#文本编辑”).Editor('setText',);

Jquery can';t将值设置为文本编辑器 $(“#文本编辑”).Editor('setText',);,jquery,Jquery,它会返回这样的结果 $('#text-edit').Editor('setText',<?php echo $adsDetails[0]["adText"]; ?>); $(“#文本编辑”).Editor('setText',测试月); 这是错误的 “未捕获的语法错误:意外标记您在语法中错过了引号。” $('#text-edit').Editor('setText',<p>test month</p>); //使用引号设置html $(“#文本编辑”).

它会返回这样的结果

$('#text-edit').Editor('setText',<?php echo $adsDetails[0]["adText"]; ?>);
$(“#文本编辑”).Editor('setText',测试月

);
这是错误的


“未捕获的语法错误:意外标记您在
语法中错过了
引号
。”

$('#text-edit').Editor('setText',<p>test month</p>);
//使用引号设置html
$(“#文本编辑”).Editor('setText',“测试月

”);
在代码中

//use quotes to set html
$('#text-edit').Editor('setText','<p>test month</p>');
var text='';
$(“#文本编辑”).Editor('setText','+text+');

按如下方式更改代码:

var text = '<?php echo $adsDetails[0]["adText"]; ?>';
$('#text-edit').Editor('setText','+text+');

$(“#文本编辑”).Editor(“setText”,”);

检查此选项,希望它能正常工作

<?php $det = $adsDetails[0]["adText"];?>
$("#text-edit").Editor("setText","<?php echo $det;?>");
$(“#文本编辑”).Editor('setText',);
试试这个 首先将文本指定给隐藏字段,然后将其设置为编辑器。 如下图所示

$('#text-edit').Editor('setText',<?php echo '$adsDetails[0]["adText"]' ?>);

使用
$(“#文本编辑”).Editor('setText',“测试月

”;
当我使用
时,您在
中遗漏了
引号('setText编辑').Editor('setText','')
它给出了错误Uncaught SyntaxError:Uncaught-SyntaxError:使用静态文本时可能会出现问题。使用动态php值时可能会出现一些问题。有人知道如何将html内容设置到行控件编辑器。您的代码是否在js文件中?我尝试了您的代码Miap,但它给出了错误“Uncaught SyntaxError:Uncaught-token-Inaligal”“@Doriyamulik现在事情应该可以解决了,检查更新的答案。谢谢你的回复。我尝试了你的代码,但它仍然给出了相同的错误“Uncaught SyntaxError:Unexpected token liked”@doriyamulik在这段代码之后呈现了什么html?它通过html内容产生了问题。我正在使用行控制编辑器。我尝试了您的代码Miap,但它给出了错误“未捕获的SyntaxError:意外标记非法”
$('#text-edit').Editor('setText',$("#hiddenField").val());