Greetings,
I have a RTE in a modal and when i want to past something from word i get the following error in my console:
ej2.min.js:9 Uncaught TypeError: Cannot read properties of undefined (reading 'parentNode')
at e.getImmediateBlockNode (ej2.min.js:9:1035355)
at e.insertTempNode (ej2.min.js:9:1031503)
at e.pasteInsertHTML (ej2.min.js:9:1028754)
at e.Insert (ej2.min.js:9:1025687)
at e.applyHtml (ej2.min.js:9:1088735)
at e.notify (ej2.min.js:9:57103)
at e.execCommand (ej2.min.js:9:1117611)
at e.formatting (ej2.min.js:9:1172802)
at e.pasteClean (ej2.min.js:9:1161426)
at e.notify (ej2.min.js:9:57103)
When i open my moda, the textarea is focussed, when i click outside the area and back in, i can paste without errors thrown. I updated to the latest version
Hi,
I adjusted the project how i'm using it. I also added a clip in the zip on how to reproduce it.
I'm not using the syncfusion modal. I also need to refresh the editor when opening the modal, if i don't, the toolbar doesn't show up.
Sometimes the RTE has a value from the database and sometimes i need to clear it by using "". When i do this, the cursor is inside the RTE and then i can't paste.
So to reproduce it:
use button to open modal.
Immediatly paste and you'll get the error
If you click outside and back in, you can just paste without error.
I think the clip will show it better.
Hi Jordi Stevens,
We have checked your reported query. To meet your requirements, we recommend the refreshUI function to refresh the RichTextEditor toolbar
and also inserting database data inside the P tag and assign into RichTextEditor value. Kindly refer to the attached code snippet and sample for your reference.
function(e) { var editor = $("#omschrijvingRapportFeedback")[0].ej2_instances[0]; editor.refreshUI(); editor.value = "<p></p>"; }); |
API link: https://ej2.syncfusion.com/documentation/api/rich-text-editor#refreshui
https://ej2.syncfusion.com/documentation/api/rich-text-editor#value
Please check the attached sample and let us know if you have any concerns.
Regards,
Vinothkumar