M
I have been trying to integrate tinymce on a custom page but it's not working. Tinymce text editor is showing but none of the buttons are working. same issue with the CKEditor 5 but no luck. Tinymce is not giving any errors related to content security policy but still not working.
Here's the code
<script src="{{ asset('vendor/webkul/admin/assets/js/tinyMCE/tinymce.min.js') }}"></script>
<div class="container mt-5">
<div class="row align-middle">
<div class="col-lg-12">
<form action="">
<textarea class="editor" cols="30" rows="10"></textarea>
</form>
</div>
</div>
</div>
<script>
tinymce.init({
selector: '.editor',
plugins: 'image imagetools media wordcount save fullscreen code table lists link hr',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor link hr | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code | table',
readonly: false,
}).then((result) => {
console.log(tinymce);
}).catch((err) => {
console.log('Error initializing TinyMCE:', error);
});
</script>