emilianotisato / nova-tinymce

Laravel Nova TinyMCE editor (with images upload capabilities!)
MIT License
116 stars 38 forks source link

DOMException: Failed to execute 'querySelectorAll' on 'Document' #80

Closed jShox closed 2 years ago

jShox commented 2 years ago

/nova-api/scripts/Nova-TinyMCE-tinymce:1:836643

This is javascript error in browser. It happens on Resource edit page. If textarea tag has auto-generated id beginnig with digit number. For example

<textarea id="4jtS5pUBVH8t7lcD__content" visibility="hidden" class="" placeholder="Content"></textarea>

After this error TinyMCE plugin will not initialized.

Attribute id could begin from digit, this is not an error. Error is use querySelectorAll method for querying by id. It could be fixed by changing selector string from '#4jtS5pUBVH8t7lcD__content' to '[id="4jtS5pUBVH8t7lcD__content"]'

jShox commented 2 years ago

Sorry, this bug is for tinymce/tinymce-vue package