微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

包含在 html 表中时,Ckeditor 5 显示不正确

如何解决包含在 html 表中时,Ckeditor 5 显示不正确

我是 ckeditor5 的新手。我想将 html 编辑器包含在这样的 html 表中......但编辑器不再响应! 当我将文本框字段放在表格中时,问题就出现了。

这是我的代码

<table style="width:100%">
    <tr>
        <td>
            <textarea id="MyEditor"></textarea>
        </td>
    </tr>
</table>

这是我放在“脚本”标签中的内容

        ClassicEditor
            .create( document.querySelector( '#MyEditor' ),{
                toolbar: {
                    items: [
                        'sourceEditing','findAndReplace','|','undo','redo','bold','italic','underline','removeFormat','heading','fontBackgroundColor','fontColor','fontFamily','fontSize','CKFinder','imageInsert',]
                },ckfinder: {
                    uploadUrl: 'ckfinder/core/connector/asp/connector.asp?command=QuickUpload&type=Files&responseType=json'
                }
                                    
            } )
            .then( editor => {
                window.editor = editor;
                TheEditor1 = editor;
            } )
            .catch( error => {
                console.error( 'Oops,something went wrong!' );
                console.error( 'Please,report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:' );
                console.warn( 'Build id: xxxxx' );
                console.error( error );
            } );

            function getDataFromTheEditor1() {
                return TheEditor1.getData();
            }

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。