Uncaught SyntaxError: Cannot use import statement outside a module
Opened this issue · 1 comments
Amirelkanov commented
Do I need to connect any more scripts?
Below is a snippet of connection and full code (index.html is in the sample folder)
<script>
import ImgurUploaderInit from 'ckeditor5-imgur-uploader'
const ImgurUploader = ImgurUploaderInit({clientID: '...'})
ClassicEditor
.create(document.querySelector('.editor'), {
extraPlugins: [ImgurUploader],
toolbar: {
items: [
'heading',
'|',
'bold',
'italic',
'link',
'bulletedList',
'numberedList',
'|',
'indent',
'outdent',
'|',
'imageUpload',
'blockQuote',
'insertTable',
'mediaEmbed',
'undo',
'redo'
]
},
language: 'ru',
image: {
toolbar: [
'imageTextAlternative',
'imageStyle:full',
'imageStyle:side'
]
},
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells'
]
},
licenseKey: '',
})
.then(editor => {
window.editor = editor;
})
.catch(error => {
console.error(error);
});
</script>
pitops commented
@Amirelkanov what is the issue exactly?