【问题标题】:defaultProtocol not working for links with ckeditor5-vuedefaultProtocol 不适用于带有 ckeditor5-vue 的链接
【发布时间】:2020-09-15 09:48:28
【问题描述】:

Vue 组件

<ckeditor :editor="classiceditor" v-model="report_notes" :config="editorConfig" @blur="editReportNotes()" @keyup.enter="editReportNotes()"></ckeditor>

vuejs 代码

    classiceditor:ClassicEditor,
    editorConfig: {
        // plugins: [ Underline],
        toolbar: {
            items: [
                'bold','italic',
                '|','link',
                '|','bulletedList', 'numberedList',
            ]
        },
        placeholder :'Write a note...',
        link: {
            defaultProtocol: 'http://'
        }
    },

问题是 defaultProtocal 未设置。当我将 gogole.com 作为链接时,它以 my-domain/google.com 的形式打开,这是一个不存在的页面

我需要http://google.com

我关注了这个文档defaultProtocal

提前谢谢你

【问题讨论】:

    标签: vue.js ckeditor vue-component ckeditor5


    【解决方案1】:

    重新安装并从版本 16.0.0 升级到 22.0.0。因为该功能是最近添加的

    npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic
    

    【讨论】:

      猜你喜欢
      • 2023-03-23
      • 2020-10-25
      • 2016-07-09
      • 1970-01-01
      • 2022-11-20
      • 2019-04-19
      • 2011-08-18
      • 2019-11-03
      • 1970-01-01
      相关资源
      最近更新 更多