Flask 编辑器-错误代码:编辑器元素冲突

Flask 编辑器-错误代码:编辑器元素冲突,flask,ckeditor,python-3.8,flask-ckeditor,Flask,Ckeditor,Python 3.8,Flask Ckeditor,在我的flask应用程序中,我在2个不同的文件上有2个CKEditor实例 <div> {{ ckeditor.create(name="message_body") }} {{ ckeditor.load(pkg_type="standard") }} {{ ckeditor.config(name="message_body", wi

在我的flask应用程序中,我在2个不同的文件上有2个CKEditor实例

        <div>
            {{ ckeditor.create(name="message_body") }}
            {{ ckeditor.load(pkg_type="standard") }}
            {{ ckeditor.config(name="message_body", width=1000, height=500) }}
        </div>

一切似乎都很好,我得到了数据,但在我的浏览器中我得到了以下错误:

[CKEDITOR] Error code: editor-element-conflict. 
Object { editorName: "message_body" }
相关文件如下:

Description: There is already an editor’s instance attached to the provided element and attaching another one to it is not allowed.
Additional data:

    editorName: The name of the already attached editor.

但我不明白为什么。有谁能帮我摆脱这些错误吗? 非常感谢

我刚刚发布了修复此问题的版本,请升级:

pip install -U flask-ckeditor
此错误背后的原因是:


当您将“ckeditor”类添加到textarea元素时,ckeditor将尝试初始化它上面的ckeditor编辑器框。同时,如果您使用
CKEditor.replace(…)
(这是
CKEditor.config()
所做的),手动初始化一个CKEditor编辑器框,则会发生错误:您无法在一个textarea元素上初始化两个CKEditor编辑器框。

您是否设法修复了它?我也面临同样的问题。不,对不起。但是,如果我的记性很好,那么当我没有指定
ckeditor.config()
时就没有错误了。我关心的是可以在父容器上使用CSS设置的宽度和高度。我还从他们的网站下载了一些内置的插件编辑器。到目前为止,我使用的是:(文件所在的文件夹称为static){{{ckeditor.create()}{{ckeditor.load(custom_url=url_for('static',filename='ckeditor/ckeditor.js'))}}此后没有错误;)好啊非常感谢你回来。我将尝试一下,我已经在使用一个定制的编辑器,但是初始化的形式与您提到的不同。谢谢
[CKEDITOR] Error code: editor-element-conflict. 
Object { editorName: "message_body" }
Description: There is already an editor’s instance attached to the provided element and attaching another one to it is not allowed.
Additional data:

    editorName: The name of the already attached editor.

pip install -U flask-ckeditor