如何设置和锁定CKEditor窗口大小? [英] How to set and lock the CKEditor window size?

查看:714
本文介绍了如何设置和锁定CKEditor窗口大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CKEditor创建一个默认大小的可调整大小的窗口。是否可以将窗口设置为所需的大小,并防止其调整大小?



样式不工作,包括textarea标记中的显式样式或行属性。



jQuery也不工作(使用height函数)。

解决方案

p>使用这些配置设置:



起始高度和宽度:

  config.height ='111px'; 
config.width = 111;






CkEditor窗口是否可调整大小:

  config.resize_enabled = false; // false that not resizable 






可调整大小,但控制方向(垂直或水平)以及最小和最大值。

  config.resize_dir ='vertical' ; //可以使用(包括垂直和水平)

高度:

  config.resize_maxHeight = 111; 
config.resize_minHeight = 111;

宽度:

 code> config.resize_maxWidth = 111; 
config.resize_minWidth = 111;

配置设置的CkEditor API位于此处:

CKEDITOR.config API



它告诉您允许值和格式设置。


CKEditor creates a resizable window of some default size. Is it possible to set the window to my desired size and prevent it from being resized?

Styles do not work, including explicit style or rows attribute in the textarea tag.

jQuery also does not work (with it's height function).

解决方案

Use these config settings:

Starting height and width:

config.height = '111px'; 
config.width = 111;


Is the CkEditor window resizeable:

config.resize_enabled = false; //false says not resizable


You can let it be resizable, but control the direction (vertical or horizontal) and the minimum and maximum values.

config.resize_dir = 'vertical'; //Can use (both, vertical, and horizontal)

Height:

config.resize_maxHeight = 111;
config.resize_minHeight = 111;

Width:

config.resize_maxWidth = 111;
config.resize_minWidth = 111;

The CkEditor API for config settings is here:
CKEDITOR.config API

It tells you the allowed values and formatting for each setting.

这篇关于如何设置和锁定CKEditor窗口大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆