@bobfrankston/rmfmail 1.2.319 → 1.2.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.commitmsg CHANGED
@@ -1,18 +1,10 @@
1
- Compose: typing after a pasted link no longer extends the link
1
+ Compose: a thin 3 cm rule above the signature instead of "-- "
2
2
 
3
- Bob 2026-09-10: "there is still a problem in typing after pasting a link.
4
- It extends the link text rather than acting as regular text."
5
-
6
- TinyMCE (his editor) turns a pasted URL into an anchor through its smart
7
- paste and leaves the caret INSIDE the anchor at the end of its text, so
8
- every character typed next became more link text while the target stayed
9
- the pasted URL a link that no longer says what it does. Same when the
10
- clipboard carries an anchor copied from a page. New
11
- stepCaretOutOfPastedLink in client/compose/editor.ts: one tick after a
12
- paste, if the caret is collapsed at the very end of an anchor, it is set
13
- to just after the anchor; a caret mid-link or outside any link is left
14
- alone. Contained in mailx's TinyMCE wiring; rmf-tiny untouched.
15
-
16
- The Quill branch has the same shape (insertText with a link format, then
17
- setSelection at its end) and is not changed here — untested, and not the
18
- editor in use.
3
+ Bob 2026-09-10: "you seem to be putting a -- above the signature. If I
4
+ want it it should be part of my HTML. If you do it it should be a line
5
+ rather than -- and maybe three cm or an inch." The signature block in
6
+ compose.ts hard-coded the "-- " delimiter above acct.sig / acct.signature.
7
+ It is now a left-aligned <hr> 3 cm wide, 1 px, grey, inline-styled since
8
+ no stylesheet travels with mail. Anything else belongs in the signature
9
+ HTML itself. Trade-off noted to Bob: other clients use "-- " to trim a
10
+ quoted signature; without it some will quote it back.
@@ -64,3 +64,5 @@ tests/trust.test.ts, .commitmsg, TODO.md C165, root version 1.2.311. Then rebuil
64
64
  click = edit in Google, right-click = Delete "<title>" (deleteCalendarEvent). Publishing as v1.2.317.
65
65
  - v1.2.318: New event Calendar picker (writable calendars via accessRole from listCalendars). Store-sync drain now passes calendarId to create/update/delete (was always "primary" — shared-calendar edits 404'd forever). Google: create/subscribe/share calendars on calendar.google.com; rmfmail lists the ones selected there.
66
66
  - v1.2.319: TinyMCE smart-paste left the caret INSIDE the pasted <a>; stepCaretOutOfPastedLink in client/compose/editor.ts moves it after the anchor one tick after paste. Quill path has the same shape (insertText link + setSelection) — untouched, Bob uses TinyMCE.
67
+ - v1.2.320: Quill counterpart — placeCaretAfterLink(index) = setSelection + format("link", false) at 5 paste sites + 2 Edit-link dialog sites. Untested; Bob will switch editor to test.
68
+ - v1.2.321: signature block uses a 3cm <hr> instead of '-- ' (compose.ts sigBlock).
@@ -4671,10 +4671,10 @@ function createQuillEditor(container2) {
4671
4671
  if (linkRange.length) {
4672
4672
  quill.deleteText(linkRange.index, linkRange.length);
4673
4673
  quill.insertText(linkRange.index, newText, { link: result.url });
4674
- quill.setSelection(linkRange.index + newText.length, 0);
4674
+ placeCaretAfterLink(linkRange.index + newText.length);
4675
4675
  } else {
4676
4676
  quill.insertText(linkRange.index, newText, { link: result.url });
4677
- quill.setSelection(linkRange.index + newText.length, 0);
4677
+ placeCaretAfterLink(linkRange.index + newText.length);
4678
4678
  }
4679
4679
  };
4680
4680
  const extraBindings = {
@@ -4978,7 +4978,7 @@ function createQuillEditor(container2) {
4978
4978
  q.deleteText(range.index, range.length);
4979
4979
  }
4980
4980
  q.insertText(range.index, text, { link: href });
4981
- q.setSelection(range.index + text.length, 0);
4981
+ placeCaretAfterLink(range.index + text.length);
4982
4982
  return;
4983
4983
  }
4984
4984
  }
@@ -4991,10 +4991,10 @@ function createQuillEditor(container2) {
4991
4991
  const url = normalizeUrl(textOnly);
4992
4992
  if (range.length > 0) {
4993
4993
  q.formatText(range.index, range.length, "link", url);
4994
- q.setSelection(range.index + range.length, 0);
4994
+ placeCaretAfterLink(range.index + range.length);
4995
4995
  } else {
4996
4996
  q.insertText(range.index, textOnly, { link: url });
4997
- q.setSelection(range.index + textOnly.length, 0);
4997
+ placeCaretAfterLink(range.index + textOnly.length);
4998
4998
  }
4999
4999
  return;
5000
5000
  }
@@ -5010,10 +5010,10 @@ function createQuillEditor(container2) {
5010
5010
  const url = normalizeUrl(plain);
5011
5011
  if (range.length > 0) {
5012
5012
  q.formatText(range.index, range.length, "link", url);
5013
- q.setSelection(range.index + range.length, 0);
5013
+ placeCaretAfterLink(range.index + range.length);
5014
5014
  } else {
5015
5015
  q.insertText(range.index, plain.trim(), { link: url });
5016
- q.setSelection(range.index + plain.trim().length, 0);
5016
+ placeCaretAfterLink(range.index + plain.trim().length);
5017
5017
  }
5018
5018
  return;
5019
5019
  }
@@ -5033,6 +5033,10 @@ function createQuillEditor(container2) {
5033
5033
  q.clipboard.dangerouslyPasteHTML(range.index, markdownToEmailHtml(plain));
5034
5034
  }
5035
5035
  }, true);
5036
+ function placeCaretAfterLink(index) {
5037
+ q.setSelection(index, 0);
5038
+ q.format("link", false);
5039
+ }
5036
5040
  q.on("text-change", (delta, _old, source) => {
5037
5041
  if (source !== "user")
5038
5042
  return;
@@ -6244,7 +6248,8 @@ function applyInit(init) {
6244
6248
  sigHtml = acct.signature;
6245
6249
  }
6246
6250
  if (sigHtml) {
6247
- const sigBlock = `<br><br>-- <br>${sigHtml}`;
6251
+ const sigRule = '<hr style="width:3cm;margin:0.8em 0 0.5em 0;border:0;border-top:1px solid #999;">';
6252
+ const sigBlock = `<br>${sigRule}${sigHtml}`;
6248
6253
  bodyToRender = isReplyForward ? `<br>${sigBlock}<br>${bodyToRender}` : `${bodyToRender}${sigBlock}`;
6249
6254
  }
6250
6255
  }