问题描述
我不需要,但由触发的自动调整大小。
将我的必要性翻译成一个时髦的/有意的代码(它不工作!),对我的应用程序:
$(window).resize (function(){
editor = CKEDITOR.instances.editor1;
editor.height = window.innerHeight - 106;
editor.width = window.innerWidth - 253;
} );
如何用CKEditor4实现这种调整大小?编辑器在textarea。
PS:行为的名称可能是改变编辑器的大小 ,但我的必要性不是关于配置的百分比宽度,请参阅所需的减法。
a href =http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resize =nofollow> editor.resize() method;)
$(window).resize(function(){
editor = CKEDITOR.instances.editor1;
editor.resize window.innerWidth - 253,window.innerHeight - 106);
});
I not need the "user ability to resize", but an automatic resize triggered by windows.resize events.
Translating my necessity into an hipothetical/intentional code (it not works!), for my applicartion:
$( window ).resize(function() {
editor = CKEDITOR.instances.editor1;
editor.height = window.innerHeight - 106;
editor.width = window.innerWidth - 253;
});
How to implement this kind of resize with CKEditor4? I am using standard editor at textarea.
PS: the name of the behaviour is perhaps "Change the Size of the Editor on the Fly", but my necessity is not about config by percentual width, see the required subtractions.
Well... just use the editor.resize() method ;)
$( window ).resize(function() {
editor = CKEDITOR.instances.editor1;
editor.resize( window.innerWidth - 253, window.innerHeight - 106 );
});
这篇关于通过windows.resize事件调整CKEditor4的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!