【发布时间】:2009-12-11 03:00:10
【问题描述】:
我正在使用 tinymce 和简单模式(jquery 插件)。最初,除非我刷新页面,否则第二个或更多打开的模式对话框不起作用(意味着我无法在文本区域中键入)。现在我更改了我的代码,现在我可以输入,但问题仍然存在,即提交按钮不再起作用。我尝试在 firebug 中进行跟踪,发现一些类似这样的错误
提前致谢
获取属性 XULElement.accessibleType 的权限被拒绝 [打破这个错误] var tinymce={majorVersion:"3",minorVersi...hanged();return true}return false})})();
这是修改后的代码
$(document).ready(function() {
$('.basic').click(function (e) {
e.preventDefault();
$('#basic-modal-content').modal({onShow: function (dialog) {
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
setup : function (ed) {
ed.onKeyPress.add(
function (ed, evt) {
var y = tinyMCE.get('test').getContent();
$('#rem_char').html(100 - y.length);
if (y.length == 100){
//ed.getWin().document.body.innerHTML = y.substring(0,100);
alert("Your element has exceeded the 100 character limit. If you add anymore text it may be truncated when saved.")
return;
}
}
);
},
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull",
theme_advanced_buttons2 : "fontselect,fontsizeselect,bullist,numlist,forecolor,backcolor",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
dialog_type : "modal"
});
return false;
}});
});
$('.close').click(function (e) {
e.preventDefault();
$.modal.close();
});
});
【问题讨论】: