【问题标题】:CKEditor 5 custom build toolbar not showingCKEditor 5 自定义构建工具栏未显示
【发布时间】:2020-12-15 14:57:18
【问题描述】:

我已经搞砸了好几天了,但是每次我开始尝试在此处的代码中添加一个 simpleuploadadapter 时,工具栏都会消失,即删除行插件:[ SimpleUploadAdapter,...],一切都很好。

我是 CKEDitor 的新手,发现文档对于新用户来说有点欠缺

这是我的代码 经典编辑器 .create(document.querySelector('#editor'), { plugins: [ SimpleUploadAdapter, ... ], // 删除此行,工具栏出现!

                     toolbar: {
          
                items: [
                    'heading',
                    '|',
                    'bold',
                    'italic',
                    'link',
                    'underline',
                    'horizontalLine',
                    'fontBackgroundColor',
                    'fontColor',
                    'fontFamily',
                    'alignment',
                    'bulletedList',
                    'numberedList',
                    '|',
                    'indent',
                    'outdent',
                    '|',
                    'imageUpload',
                    'blockQuote',
                    'insertTable',
                    'mediaEmbed',
                    'undo',
                    'redo',
                    'highlight',
                    'specialCharacters']
                    },language: 'en',image: {toolbar: ['imageTextAlternative','imageStyle:full','imageStyle:side']},
            table: {
                contentToolbar: [
                    'tableColumn',
                    'tableRow',
                    'mergeTableCells',
                    'tableCellProperties'
                ]
            },
            licenseKey: '',
            
        } )
        .then( editor => {
            window.editor = 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: 2s2liiisdwtn-fs46wvie39gh' );
            console.error( error );
        } );

【问题讨论】:

    标签: ckeditor5


    【解决方案1】:

    您的安装是否是定制的?如果没有,您是否尝试创建包含该插件的自定义构建设置,然后尝试通过加载其示例文件进行检查?通过消除页面设计上的其他任何东西可能会干扰的可能性,这将帮助我们看到。能不能说的清楚一点?

    问候...

    【讨论】:

    • 抱歉这么久才回复,是的,它是使用在线自定义构建工具进行的自定义构建。并按照文档安装和运行构建
    • 好的,我现在使用 base64uploadadapter 而不是 simpleuploadadapter 并且现在可以正常工作,但是我仍然想知道我需要做什么才能让后者工作,因为已经阅读了所有内容并尝试了其他示例都没有成功
    猜你喜欢
    • 2019-02-25
    • 1970-01-01
    • 2014-02-15
    • 1970-01-01
    • 1970-01-01
    • 2015-09-12
    • 1970-01-01
    • 2020-09-28
    • 1970-01-01
    相关资源
    最近更新 更多