![](/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.