gpt4 book ai didi

php - 调整从 CDN 提供的 CKEditor 的大小

转载 作者:行者123 更新时间:2023-11-27 23:29:31 26 4
gpt4 key购买 nike

我已通过 CDN ( https://cdn.ckeditor.com/ ) 将 CKEditor 添加到我的 PHP 项目以替换当前的文本区域。

我将它链接到适用文件的头部:

<script src="//cdn.ckeditor.com/4.5.8/standard/ckeditor.js"></script>

在我的 main.js 文件中,我替换了文本区域:

CKEDITOR.replace('message');
CKEDITOR.replace('address');
CKEDITOR.replace('note_message');
CKEDITOR.replace('reminder');
CKEDITOR.replace('save_the_date_message');
CKEDITOR.replace('thank_you_message');

//trial code
CKEDITOR.config.width = 600;

我已经搜索并尝试阅读文档,但无法弄清楚如何调整每个文本区域的高度/宽度。这是我文件中的当前外观:

mypic

任何有关如何解决此问题的见解都将不胜感激。

最佳答案

要改变它的大小,你只需要改变它的HTML代码。示例:

<textarea name="editor"></textarea>

在这段代码中,您有文本区域,要调整它的大小,请像这样使用 CSS:

<textarea name="editor" style="width:400px; height:500px;"></textarea>

或者:

<textarea name="editor1" width="400" height="500"></textarea>

但是,如果您想使用 javascript 调整大小,请使用以下代码:

CKEDITOR.replace('editor', {
width: '400',
height: 500
});

真诚的,卢卡斯·穆勒。

关于php - 调整从 CDN 提供的 CKEditor 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36585097/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com