CK编辑器5如何限制用户输入受限字符

时间:2019-02-26 09:22:57

标签: javascript c# asp.net-mvc ckeditor5

我正在使用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);
                });

0 个答案:

没有答案