Textarea内容未显示且textarea不可编辑(随机发生)
只有当我调整编辑器的大小(右下角手柄)时,内容才会开始显示且编辑器可编辑,此错误随机出现,仅在Chrome中进行测试。有没有人经历过这个或任何解决方案会有所帮助?
我的textarea示例:
<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
屏幕截图更新
Click here to view screenshots
问题已解决
我在iframe的输出中找到了显示Bug:
工作编辑:
<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之间宽度的区别,导致问题的编辑器是 width:0px 的编辑器,不知何故,当您调整浏览器大小或编辑器将宽度更改回 704px 。
希望这将有助于将来......
答案 0 :(得分:2)
显示问题是由输出大小为“width:0px”的iframe的编辑引起的。
下一步,找到可能的解决方案:
<强> CSS 强> 为所有Iframe设置预定义宽度,例如[CSS] [1];
OR
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;
}