【发布时间】:2013-11-11 15:52:07
【问题描述】:
我在 MVC3 中使用 ckeditor 进行 Richtextbox 编辑。 在普通视图中,ckeditor 运行良好,但是当我尝试将它与 jQuery ui Dialog 一起使用时,我遇到了一些问题。
我的对话:
$(document).ready(function() {
jQuery.noConflict();
jQuery("#contentOpen").live("click", function(e) {
e.preventDefault();
jQuery('<div />', {
class: 'customPopUp',
id: "popUpDialog",
}).appendTo("body")
.load(this.href, function() {
jQuery(this).dialog({
close: function() {
if (CKEDITOR.instances['NewsCulture_Content']) {
CKEDITOR.instances['NewsCulture_Content'].destroy();
}
jQuery(this).remove();
},
open: jQuery(function() {
jQuery('#NewsCulture_Content').ckeditor();
}),
width: 'auto',
height: 'auto',
});
});
});
});
查看:
@{
Layout = null;
}
<script src="@Url.Content("~/Scripts/ckeditor/ckeditor.js")" type="text/javascript">/script>
<script src="@Url.Content("~/Scripts/ckeditor/adapters/jQuery.js")" type="text/javascript"></script>
@model CyberSystems.ViewModel.ViewModels.System.VmSysNewsCreatre
@using (Ajax.BeginForm("News_Room_AddNew", "Administration", null,
new AjaxOptions {HttpMethod = "POST", OnComplete = "addBarNewsCompelte"}, new {id = "addRoomNewsForm"}))
{
@Html.TextAreaFor(c=>c.NewsCulture.Content)
}
第一次一切都很好,看起来像picture1; 两次单击相同的插件(样式)后出现问题,@ 987654322@。 我不知道是什么问题,任何想法将不胜感激......
【问题讨论】:
-
如果您在这里没有得到很好的回应,我之前在 ck 论坛中找到了帮助...ckeditor.com/forums
-
不,我没有在 ck 论坛上找到回复....
-
您需要修复帖子中的图片,使其正确显示。现在两个图像是相同的,你无法分辨出哪里出了问题。
标签: jquery asp.net-mvc user-interface dialog ckeditor