限制编辑器 window ckeditor 的高度
limit editor window height of ckeditor
我找不到限制 ckeditor 高度的方法 window。
我已经尝试了通过 google 和 none 工作找到的所有解决方案:在 CKEDITOR 调用之后的表、div、配置命令应该工作但不工作:
<script type='text/javascript'>CKEDITOR.replace('cTitle1');CKEDITOR.config.height = '800px';</script>
我有最新版本的ckeditor。
我不想在全球范围内限制它,只是特定实例,因为有时我希望它是常规尺寸,有时我需要它不那么高。
提前致谢。
你可以直接传递配置对象来替换方法:
CKEDITOR.replace( 'editor', {
height: '400px'
} );
如果要防止编辑器调整大小,也可以在配置对象中将config.resize_enabled
设置为false
:
CKEDITOR.replace( 'editor', {
height: '400px',
resize_enabled: false
} );
请看this example。
如果您只想在调整编辑器大小时限制高度,可以添加 config.resize_maxHeight
to the configuration object. Check the "Editor Resizing Customization" sample and documentation 以获得更多选项和示例。
我找不到限制 ckeditor 高度的方法 window。
我已经尝试了通过 google 和 none 工作找到的所有解决方案:在 CKEDITOR 调用之后的表、div、配置命令应该工作但不工作:
<script type='text/javascript'>CKEDITOR.replace('cTitle1');CKEDITOR.config.height = '800px';</script>
我有最新版本的ckeditor。
我不想在全球范围内限制它,只是特定实例,因为有时我希望它是常规尺寸,有时我需要它不那么高。
提前致谢。
你可以直接传递配置对象来替换方法:
CKEDITOR.replace( 'editor', {
height: '400px'
} );
如果要防止编辑器调整大小,也可以在配置对象中将config.resize_enabled
设置为false
:
CKEDITOR.replace( 'editor', {
height: '400px',
resize_enabled: false
} );
请看this example。
如果您只想在调整编辑器大小时限制高度,可以添加 config.resize_maxHeight
to the configuration object. Check the "Editor Resizing Customization" sample and documentation 以获得更多选项和示例。