From f8e108cfe9d965c25f51fb95fa9e33d603185680 Mon Sep 17 00:00:00 2001 From: DatDang Date: Thu, 7 Mar 2024 09:02:58 +0700 Subject: [PATCH] TF-2591 Create ADR for formatting decision --- ...verlap-on-pasting-or-dropping-rich-text.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/adr/0041-fix-text-overlap-on-pasting-or-dropping-rich-text.md diff --git a/docs/adr/0041-fix-text-overlap-on-pasting-or-dropping-rich-text.md b/docs/adr/0041-fix-text-overlap-on-pasting-or-dropping-rich-text.md new file mode 100644 index 000000000..275639b10 --- /dev/null +++ b/docs/adr/0041-fix-text-overlap-on-pasting-or-dropping-rich-text.md @@ -0,0 +1,21 @@ +# 41. Fix text overlap on pasting or dropping rich text + +Date: 2024-03-07 + +## Status + +Accepted + +## Context + +- When copy-pasting or drag-dropping rich text from LibreOffice to email composer, text is overlapped on the same line + +## Decision + +1. Have a js script to change the `line-height` style of all elements that has their `line-height` modified to 100% +2. HtmlEditor has onPaste callback, trigger the `line-height` script here +3. Add listener to `drop` event using js and also trigger `line-height` script here + +## Consequences + +- Even if the content available that's not pasted or dropped will get reformatted. Currently our composer doesn't support changing text line height, so the impact will not affect avaiable content yet.