TinyMCE框架调整大小的跨浏览器问题
Cross browser issue with TinyMCE iframe resize
我找到了一个解决方案来调整我的tinyMCE实例的大小(它们是只读的)。我遇到了一个问题,几个小时都解决不了。当我init tinyMCE一切都是OK的,但在Internet Explorer和Chrome的早期版本这不起作用
tinyMCE.init({
mode: "textareas",
theme: "advanced",
readonly: true,
theme_advanced_path: false,
theme_advanced_resize_horizontal: false,
autoresize: true,
width: "870",
setup: function(ed) {
ed.onLoadContent.add(function(ed, o) {
var iFrameID = "#" + ($(this).attr('id')) + "_ifr";
$(iFrameID).height($(iFrameID).contents().find("html").height());
//iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
});
}
});
也我的Java脚本尝试下面的jQuery也不工作。如果有人能解决这个问题,我会很高兴的!提前感谢!
这是我工作的配置!
tinyMCE.init({
mode: "textareas",
theme: "advanced",
theme_advanced_path: false,
theme_advanced_resize_horizontal: false,
autoresize: true,
readonly: true,
width: "870",
plugins: 'autoresize',
autoresize_min_height: "200",
autoresize_max_height: "50000",
init_instance_callback: function(inst) {
inst.execCommand('mceAutoResize');
},
setup: function(ed) {
ed.onLoadContent.add(function(ed, o) {
var iFrameID = "#" + ($(this).attr('id')) + "_ifr";
$(iFrameID).contents().find("html").children().append("<base target=_blank>");
//The following row not works in IE - $(iFrameID).height($(iFrameID).contents().find("html").height());
});
}
});
相关文章:
- 跨浏览器问题:如何调试我的网站'在windows PC的safari上的行为
- DOM 操作、向后兼容性和跨浏览器问题
- 这是HTML5和javascript的浏览器问题吗
- Javascript Array 跨浏览器问题
- 斯克罗尔移动浏览器问题
- 当单击 shift + 鼠标左键单击时,Internet Explorer 浏览器问题 ,文本会自动突出显示
- Javascript跨浏览器问题
- jquery AJAX 获取请求跨浏览器问题
- 脚本标记的跨浏览器问题
- PhoneGap外部浏览器问题
- 使用jQuery Mobile时出现跨浏览器问题
- 在发布到服务器之前进行一些客户端验证 - 浏览器问题
- onLoad中未加载JavaScript(Android webView浏览器问题)
- DIV滚动器的跨浏览器问题
- 浏览器问题:分支选择下拉菜单在IE 7或8中不支持
- 表单提交的跨浏览器问题
- Internet Explorer浏览器问题:浏览器不提交POST数据与Ajax请求,服务器/客户端挂起
- 检查用户名是否存在-跨浏览器问题!建议
- JavaScript验证的跨浏览器问题
- Chrome浏览器问题:“加载资源:net::ERR_CONNECTION_TIMED_OUT”失败