Copy-paste (from Word) to email composer generates "undefined" #2394
Labels
🚪 entry-level
Good for newcomers
🐬 Medium
Just a nice sized issue.
🛑 potentially blocked
Potentially blocked by prerequisites (double check or ask someone, as it may have changed)
Description
To send mass email from Zetkin, one must compose the email in the editor (which is built using Editor.js). Some users will copy-paste content from other sources, e.g. from a word processing software (like Microsoft Word or LibreOffice).
Copy-pasting from Word or LibreOffice into the email composer will sometimes generate unexpected blocks, and render different content in the editor from what is represented in the editor state.
Steps to reproduce
/api/orgs/1/emails/<email-id>
, and<email-id>
can be found in the URL of the compose pageuuid
from the API response, browse to the web view of the email at/o/1/viewmail/<uuid>
Expected Behaviour
The rendered email (in the web view) should look very similar to what is rendered in the composer, and should contain all of the content pasted from the document.
Actual Behaviour
The rendered email does not display any of the content that was pasted into the composer. When you look at the API response (step 9) it becomes clear that the blocks generated from the editor content are nothing like the content displayed. It's full of unnamed variables:
Screenshots (if you have any)
The document (step 2)
Pasted into the composer (step 8)
Email data in API
Web view of email
The text was updated successfully, but these errors were encountered: