Frederick888 / external-editor-revived

External Editor Revived is a Thunderbird MailExtension which allows editing emails in programs such as Vim, Neovim, Emacs, etc.
GNU General Public License v3.0
110 stars 6 forks source link

Line breaks created by #142

Closed weierophinney closed 8 months ago

weierophinney commented 8 months ago

Description

Newlines created within the external editor are not honored when returning to the TB compose screen. Instead, they are all merged to a single, wrapped line.

If I spawn the external editor again, it shows the line breaks correctly.

I have tried switching between \n and \r\n for line breaks, but with no success.

Environment

Configuration

Logs

ExtEditorR sending:  
Object { configuration: {…}, tab: {…}, composeDetails: {…} }
​
composeDetails: Object { from: "Matthew Weier O'Phinney <email@example.com>", overrideDefaultFcc: false, type: "new", … }
​​
additionalFccFolder: ""
​​
attachVCard: false
​​
attachments: Array []
​​
bcc: Array []
​​
body: '<!DOCTYPE html>\n<html><head>\n<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>This is a test.\n\nDo we see line breaks?\n\nPlease?\n</body></html>'
​​
cc: Array []
​​
customHeaders: Array []
​​
deliveryFormat: "plaintext"
​​
deliveryStatusNotification: false
​​
followupTo: Array []
​​
from: "Matthew Weier O'Phinney <email@example.com>"
​​
identityId: "id1"
​​
isPlainText: false
​​
newsgroups: Array []
​​
overrideDefaultFcc: false
​​
overrideDefaultFccFolder: null
​​
plainTextBody: "This is a test. Do we see line breaks? Please?"
​​
priority: "normal"
​​
relatedMessageId: null
​​
replyTo: Array []
​​
returnReceipt: false
​​
subject: ""
​​
to: Array []
​​
type: "new"
​​
<prototype>: Object { … }
​
configuration: Object { version: "1.0.0", shell: "sh", template: '/home/username/.local/bin/neovide --neovim-bin /home/username/.local/bin/nvim --no-fork "/path/to/temp.eml"', … }
​
tab: Object { id: 8, index: 0, windowId: 103, … }
​
<prototype>: Object { … }
[background.js:118:11](moz-extension://8c2388f3-d97c-4835-a844-0b9007561e1a/background.js)
ExtEditorR received:  
Object { configuration: {…}, warnings: [], tab: {…}, composeDetails: {…} }
[background.js:138:11](moz-extension://8c2388f3-d97c-4835-a844-0b9007561e1a/background.js)

Screenshots

External editor:

image

On return to TB:

image

Frederick888 commented 8 months ago

isPlainText: false

https://github.com/Frederick888/external-editor-revived/wiki#plain-text-emails

Or use <br/>.