How to set and lock the CKEditor window size?

前端 未结 2 515
春和景丽
春和景丽 2021-01-13 17:19

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,

2条回答
  •  孤城傲影
    2021-01-13 17:35

    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.

提交回复
热议问题