I created a custom build of CKEditor which works fine.
ClassicEditor
.create(document.querySelector('#editor'), {
plugins: [Essentials, Autosave, Paragraph, Bold, Subscript, Superscript, Strikethrough, PasteFromOffice, Table, TableToolbar, TableProperties, TableCellProperties, TableCaption, List, Link, Image, ImageToolbar, ImageCaption, ImageStyle, ImageResize, LinkImage, Heading, ImageUpload, FontColor, BlockQuote, Italic, Alignment, SourceEditing, Underline, Undo, SimpleUploadAdapter],
toolbar: ['bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript', 'BlockQuote', 'fontcolor', 'spoiler', 'insertTable', 'List', 'Link', 'ImageUpload', 'Image', 'ImageToolbar'],
})
.then(editor => {
console.log('Editor was initialized', editor);
})
.catch(error => {
console.error(error.stack);
});
This made a bundle.js which works fine. But it’s locked onto a single selector loaded at runtime?
How do I call the editor and set it to work on other selectors in my app afterwards instead of build time?
Where is the documentation on how to create/destroy the editor onto different inputs, I can’t find that anywhere.