Here I integrate classic CK-Editor in View of C# file.I am trying to add new autocomplete plugin in classic editor.
<div class="card-body areacls cardBox" contenteditable="true" id="@areaId" data-href="@item.Id" onclick="createEditor(@areaId)">
@Html.Raw(item.Description)
</div>
<script>
var editors = new Map();
function createEditor(elementToReplace) {
return ClassicEditor
.create(elementToReplace)
.then(editor => {
editors.set(elementToReplace, editor);
})
.catch(err => console.error(err.stack));
}
</script>
2
Answers
In classic Editor 5 version has some builtin plugins. you can't add new plugins in 5 version.If you want to use new plugin like mention you have to create your own custom editor from here https://ckeditor.com/ckeditor-5/online-builder/ or you can change the predefined builds like Classic,Inline,Balloon,Balloon-block,Document,Multi-root,Superbuild.
Try to use
F12
to see if any error message in your console.I guess you miss the
<script>
,refer to [ckeditor.com] 🙁https://cdn.ckeditor.com/)add below code:
result: