文本区域内容不显示,文本区域不可编辑(随机发生)
只有当我调整编辑器(右下角手柄)的大小时,内容才会开始出现并且编辑器是可编辑的,此错误才会随机出现,并且仅在 Chrome 中测试。有没有人经历过这个或任何解决方案会有所帮助?
我的文本区域示例:
<textarea rows="5" cols="80"><?php echo $output; ?></textarea>
这就是我的设置方式:
// Set the ckeditor wysiwyg editor
function CKupdate(){
for ( instance in CKEDITOR.instances )
CKEDITOR.instances[instance].updateElement();
}
$( 'textarea' ).ckeditor();
CKEditor 版本 4.4.6
使用屏幕截图更新
点击这里查看截图
问题已解决
我在 iframe 的输出中找到了显示错误:
工作编辑:
<iframe src="" frameborder="0" class="cke_wysiwyg_frame cke_reset" title="Rich Text Editor, detailed_description" aria-describedby="cke_125" tabindex="0" allowtransparency="true" style="width: 704px; height: 100%;"></iframe>
带有显示错误的编辑器:
<iframe src="" frameborder="0" class="cke_wysiwyg_frame cke_reset" title="Rich Text Editor, customers" aria-describedby="cke_71" tabindex="10" allowtransparency="false" style="width: 0px; height: 200%;"></iframe>
请注意两个编辑器/iframe 之间的宽度差异,导致问题的编辑器是宽度为:0px 的编辑器,不知何故,当您调整浏览器或编辑器的大小时,它会将宽度更改回 704px。
希望这将对将来的某人有所帮助...
显示问题是由输出大小为"宽度:0px"的 iframe 的编辑器引起的。
下一步,找到可能的解决方案:
.CSS为所有 Iframe 设置预定义的宽度,例如 [CSS][1];
或
Jquery (例如: [change-iframe-width-and-height-using-jquery][2])
[1]: http://jsfiddle.net/7WRHM/1001/
[2]: http://stackoverflow.com/a/14913861/2842657
我还没有彻底测试,但这个解决方案似乎解决了这个问题:
.cke_contents > iframe{
width: 100% !important;
}