defaultProtocol 不适用于与 ckeditor5-vue 的链接
defaultProtocol not working for links with ckeditor5-vue
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 设为 link 时,它以 my-domain/google.com 打开,这是一个不存在的页面
我需要它,因为 http://google.com
我关注了这个文档defaultProtocal
提前致谢
re-installeed 并从版本 16.0.0 升级到 22.0.0。因为最近添加了该功能
npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic
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 设为 link 时,它以 my-domain/google.com 打开,这是一个不存在的页面
我需要它,因为 http://google.com
我关注了这个文档defaultProtocal
提前致谢
re-installeed 并从版本 16.0.0 升级到 22.0.0。因为最近添加了该功能
npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic