我正在使用CK编辑器5。如何在编辑器中使用maxlength来限制用户输入的不带HTML标记的char不超过500个
ClassicEditor
.create(document.querySelector('#Sample'), {
toolbar: ["undo", "redo", "bold", "italic", "blockQuote", "ckfinder", "imageTextAlternative", "imageUpload", "heading", "imageStyle:full", "imageStyle:side", "link", "numberedList", "bulletedList", "mediaEmbed", "insertTable", "tableColumn", "tableRow", "mergeTableCells"],
ckfinder: {
// Upload the images to the server using the CKFinder QuickUpload command.
uploadUrl: '',
// Define the CKFinder configuration (if necessary).
}
})
.then(editor => {
window.editor = editor;
});
})
.catch(err => {
// console.error(err.stack);
});