我正在尝试将CKFinder实现到最新的CKEditor 5版本,但仍然显示错误-未定义上传适配器
我创建了自己的PHP上传器,但是它被忽略并且我的代码无法正常工作。我尝试过:
<script src="../inc/ckeditor/ckfinder/ckfinder.js"></script>
<script> ClassicEditor
.create( document.querySelector( '#editor1' ),{language: 'cs'},
{plugins: [ 'CKFinder']},
{
toolbar: [ 'imageUpload', 'heading', '|','undo', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
{model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3'}
]
}
},
{ ckfinder: {
uploadUrl: '/inc/uploader/uploader.php'
}
}
)
.then( editor => {
console.log( Array.from( editor.ui.componentFactory.names ) );
} )
.catch( error => {
console.log( error );
} );
</script>
我检查了可实施的不良文档,但没有成功。