![](/img/trans.png)
[英]CKEDITOR doesn't save/parse width/height in attributes and styles simultaneously
[英]CKEditor & JavaScript - Adjust height and width in CKEditor
如何在CKEditor中调整高度?
这是我的CKEditor代码。
<script type="text/javascript">
CKEDITOR.replace( 'content',
{
toolbar :
[
['Source'],
['Bold','Italic','Underline','Strike'],
]
});
</script>
在参数中添加高度和宽度设置:
CKEDITOR.replace( 'content',
{
toolbar :
[
['Source'],
['Bold','Italic','Underline','Strike'],
],
height: 300,
width: 400
});
转到confi.js文件并在
CKEDITOR.editorConfig = function( config ) {
.
.
.
.
**config.height = 320;**
};
所以实际上你只需要添加config.height = required height;
。
这可以通过在公共脚本文件中添加几行代码轻松完成。
**注意:无论是宽度还是高度,都不需要提及'px'。 '%'是必须的!
而已!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.