We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Pasting html content does not display correctly and cannot be edited

Hi,

In the RichTextEditor, configured with the parameter enterKey: 'BR' when pasting a content with html from another page, the text is displayed wrong in the editor and cannot be edited once pasted. Also, when you get the value of the content with the defaultRTE.value parameter you get an empty string.

Instead, with the enterKey: 'P' parameter this problem does not happen.


To reproduce the problem:


1. open the following example:

https://stackblitz.com/edit/a8qyer-sn5caq?file=index.js


2. Open this web page and click on the icon to copy the translated text:

https://www.deepl.com/translator#es/en/Esta%20es%20una%20prueba


3. Go back to the example editor and paste the content below where it says "Paste below" (Keeping the formatting). The text will be displayed incorrectly (as shown in the following image) and will not be editable.


4. On the other hand, if you try the following example configured with the parameter enterKey: 'P' the content is pasted correctly and can be edited.


This problem also happens if for example you copy from a Gmail mail or other type of content.

Is this a bug?

Thank you!


11 Replies 1 reply marked as answer

PA Pere Argelich Romà January 16, 2023 10:45 AM UTC

Copying and pasting from a Word document also causes the same problem.

Attached is a sample Word document.


Attachment: Test_document_c288087a.zip


VJ Vinitha Jeyakumar Syncfusion Team January 18, 2023 12:46 PM UTC

Hi Pere,

We have already considered the reported issue "Pasting texts causes it to exceed out of the contentEditable div when using EnterKey as 'BR' or 'DIV' in RTE" as a bug from our end and the fix for the issue will be included with our upcoming Vol 4 SP release

Now you can track the status of the reported issue through the feedback below,

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Vinitha




PA Pere Argelich Romà January 18, 2023 01:46 PM UTC

It shows me access denied to the link.

Thank you.



VJ Vinitha Jeyakumar Syncfusion Team January 19, 2023 06:43 AM UTC

Hi Pere,


We have added your email id to the feedback. Now check the below feedback,

Regards,
Vinitha


PA Pere Argelich Romà February 8, 2023 09:20 AM UTC

I have tested and the initial error has been solved, but I have found another error, I detail the steps to follow:

1. Open the following example: https://stackblitz.com/edit/a8qyer-ytt1uo?file=index.html

2. Open the attached Word document, copy all the text.

3. Go back to the example, place the cursor as shown in the image.


4. Paste the copied text (in "Plain text" format).

5. Place the cursor at the end of the text, delete with the Backspace key all the copied text up to where you see the cursor in the following image.


6. Insert two line breaks up to where you see the image.


7. Paste again the text copied from Word (in "Keep" format) -> Nothing is pasted.


Attachment: This_is_a_test_4218f362.zip


VJ Vinitha Jeyakumar Syncfusion Team February 9, 2023 02:19 PM UTC

Hi Pere,

We can replicate the reported issue at our end. we will update you with the further bug details on 10th Feb 2023.

Regards,
Vinitha


VJ Vinitha Jeyakumar Syncfusion Team February 10, 2023 04:55 AM UTC

Hi Pere,

We have considered the reported issue "Pasting from Word doesn't work properly with enterKey 'BR' in RichTextEditor " as a bug from our end and the fix for the issue will be included with our upcoming patch release on 21st Feb 2023.

Now you can track the status of the reported issue through the feedback below,

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”


Regards,

Vinitha




PA Pere Argelich Romà replied to Vinitha Jeyakumar February 10, 2023 09:03 AM UTC

Ok, thank you very much!



PA Pere Argelich Romà February 22, 2023 08:22 AM UTC

I have seen that in the last version 20.4.51 the error was fixed according to the release notes, but I have tried with the same example (updating the version files) and the same error still occurs.


https://stackblitz.com/edit/a8qyer-1nxr1s?file=index.html


The steps to reproduce the error are the same as before.



VY Vinothkumar Yuvaraj Syncfusion Team February 23, 2023 02:18 PM UTC

Hi Pere,


We couldn't include the fix in the last patch release as we are facing complexity in resolving the issue. We will fix the issue in the upcoming first week of March and let you know once it is included.



VY Vinothkumar Yuvaraj Syncfusion Team March 15, 2023 02:27 PM UTC

Hi Pere,


We have included the fix for the issue "Pasting from Word doesn't work properly with enterKey 'BR' in RichTextEditor" with our package version 20.4.53. So, can you please upgrade your package to the latest to resolve the issue from your end.


Regards,

Vinothkumar


Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon