@bobfrankston/rmfmail 1.1.90 → 1.1.91
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 +10 -6
- package/client/compose/compose.bundle.js +24 -0
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/lib/rmf-tiny.js +35 -0
- package/npmchanges.md +10 -0
- package/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-75596 → node_modules.npmglobalize-stash-62528}/.package-lock.json +0 -0
package/.commitmsg
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
Fix: typing after a URL no longer swallows text into the link
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
In the TinyMCE editor, typing or pasting a URL auto-linked it, but the
|
|
4
|
+
caret stayed inside the <a>, so every following character was appended
|
|
5
|
+
into the link text — a whole sentence turned into one link.
|
|
6
|
+
|
|
7
|
+
rmf-tiny's adapter now has a keypress handler: when a printable key is
|
|
8
|
+
pressed with the caret collapsed at the trailing edge of an <a>, the
|
|
9
|
+
caret hops to just after the <a> first, so the new text lands outside
|
|
10
|
+
the link. Covers autolink, pasted URLs, and hand-made links.
|
|
11
|
+
(client/lib/rmf-tiny.js rebuilt from the adapter source.)
|
|
@@ -742,6 +742,30 @@ async function createTinyMceEditor(container2, opts = {}) {
|
|
|
742
742
|
applyZoom();
|
|
743
743
|
}
|
|
744
744
|
});
|
|
745
|
+
ed.on("keypress", (e) => {
|
|
746
|
+
if (e.ctrlKey || e.altKey || e.metaKey)
|
|
747
|
+
return;
|
|
748
|
+
const sel = ed.selection;
|
|
749
|
+
const rng = sel.getRng();
|
|
750
|
+
if (!rng || !rng.collapsed)
|
|
751
|
+
return;
|
|
752
|
+
const a = ed.dom.getParent(sel.getNode(), "a");
|
|
753
|
+
if (!a)
|
|
754
|
+
return;
|
|
755
|
+
let tail;
|
|
756
|
+
try {
|
|
757
|
+
tail = rng.cloneRange();
|
|
758
|
+
tail.setEndAfter(a);
|
|
759
|
+
} catch {
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
if (tail.toString().length > 0)
|
|
763
|
+
return;
|
|
764
|
+
const after = ed.getDoc().createRange();
|
|
765
|
+
after.setStartAfter(a);
|
|
766
|
+
after.collapse(true);
|
|
767
|
+
sel.setRng(after);
|
|
768
|
+
});
|
|
745
769
|
ed.on("init", () => {
|
|
746
770
|
try {
|
|
747
771
|
const body = ed.getBody();
|