I am utilizing TinyMCE 4 and here is the code snippet for it:
<script type="text/javascript" src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>
tinymce.init({
selector: 'textarea[name=content]',
plugins: 'image code',
toolbar: 'undo redo | link image | code',
image_title: true,
automatic_uploads: true,
file_picker_types: 'image',
file_picker_callback: function(cb, value, meta) {
var input = document.createElement('input');
input.setAttribute('type', 'file');
input.setAttribute('accept', 'image/*');
input.onchange = function() {
var file = this.files[0];
var reader = new FileReader();
reader.onload = function () {
var id = 'blobid' + (new Date()).getTime();
var blobCache = tinymce.activeEditor.editorUpload.blobCache;
var base64 = reader.result.split(',')[1];
var blobInfo = blobCache.create(id, file, base64);
blobCache.add(blobInfo);
cb(blobInfo.blobUri(), { title: file.name });
};
reader.readAsDataURL(file);
};
input.click();
}
});
</script>
However, I am encountering an issue. After clicking on the "submit" button, the form does not get sent, and in the web browser console, I see an error message: "An invalid form control with name='content' is not focusable."
I would appreciate any guidance on how to resolve this issue efficiently. Thank you in advance for your help.