У меня есть ckEditor на моей странице. Я хочу добавить мое новое jquery значение переменной со старым значением в мой CKEditor.
<asp:TextBox TextMode="multiLine" class="span4" ID="txtDescription"
Rows="10" Columns="80" runat="server" MaxLength="300" Style="border: solid 1px #e7e7e7;
background: none repeat scroll 0 0 #E7E7E7;">
</asp:TextBox>
<div id="imgDiv"></div>
<script type="text/javascript">
CKEDITOR.config.toolbar_MA = [['Source', '-', 'Print', 'Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo', 'RemoveFormat', '-', 'Link', 'Unlink', 'Anchor', '-', 'Image', 'Table', 'HorizontalRule', 'SpecialChar'], '/', ['Format', 'Templates', 'Bold', 'Italic', 'Underline', '-', 'Superscript', '-', ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], '-', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent']];
CKEDITOR.replace('<%= txtDescription.ClientID %>', { baseHref: '<%= ResolveUrl("~/ckeditor/") %>', height: 150, toolbar: 'MA' });
</script>
Вот код jquery, в котором у меня есть переменная "n ». Я хочу добавить значение "n" со старым значением CK Editor.
$("#imgDiv").on("click", function (event) {
var offset = $(this).offset();
var x = "186";
var y = "374";
$.ajax({
type: "POST",
url: "Section.aspx/GetCordiData",
//data: '',
data: JSON.stringify({ 'xGet': x, 'yGet': y }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
//alert("Success");
//console.log(data);
var imgcordival = JSON.parse(data.d);
$.each(imgcordival, function (i, jsondata) {
var n = jsondata.HotSpotDescription;
alert(n);
});
}
});
});