@bobfrankston/rmfmail 1.2.147 → 1.2.148
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/client/compose/compose.bundle.js +27 -6
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/lib/rmf-tiny.js +39 -6
- package/package.json +3 -3
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +71 -26
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +69 -26
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-69320 → node_modules.npmglobalize-stash-64016}/.package-lock.json +0 -0
|
@@ -2137,12 +2137,11 @@ async function createTinyMceEditor(container2, opts = {}) {
|
|
|
2137
2137
|
relative_urls: false,
|
|
2138
2138
|
remove_script_host: false,
|
|
2139
2139
|
paste_data_images: true,
|
|
2140
|
-
//
|
|
2141
|
-
//
|
|
2142
|
-
//
|
|
2143
|
-
//
|
|
2144
|
-
|
|
2145
|
-
paste_retain_style_properties: "color background background-color font-family font-size font-weight font-style text-decoration text-align padding padding-top padding-bottom padding-left padding-right margin margin-top margin-bottom margin-left margin-right border border-top border-bottom border-left border-right",
|
|
2140
|
+
// NOTE: paste_word_valid_elements and paste_retain_style_properties
|
|
2141
|
+
// were REMOVED in TinyMCE 8 (core paste keeps formatting by
|
|
2142
|
+
// default now) — passing them only triggered the deprecation
|
|
2143
|
+
// console warning on every compose load. Removed 2026-07-18; if
|
|
2144
|
+
// TinyMCE is ever pinned back to ≤7, restore them from git.
|
|
2146
2145
|
// Auto-link bare URLs in pasted content. TinyMCE's `autolink`
|
|
2147
2146
|
// plugin only fires on TYPED space/enter; URLs that arrive via
|
|
2148
2147
|
// clipboard (browser address bar, terminal copy) come in as
|
|
@@ -2203,6 +2202,28 @@ async function createTinyMceEditor(container2, opts = {}) {
|
|
|
2203
2202
|
setup: (ed) => {
|
|
2204
2203
|
if (opts.initialHtml)
|
|
2205
2204
|
ed.on("init", () => ed.setContent(opts.initialHtml));
|
|
2205
|
+
ed.on("paste", (e) => {
|
|
2206
|
+
const cb = e.clipboardData;
|
|
2207
|
+
if (!cb)
|
|
2208
|
+
return;
|
|
2209
|
+
const imgItem = Array.from(cb.items || []).find((i) => i.kind === "file" && i.type.startsWith("image/"));
|
|
2210
|
+
if (!imgItem)
|
|
2211
|
+
return;
|
|
2212
|
+
if ((cb.getData("text/plain") || "").trim())
|
|
2213
|
+
return;
|
|
2214
|
+
const file = imgItem.getAsFile();
|
|
2215
|
+
if (!file)
|
|
2216
|
+
return;
|
|
2217
|
+
e.preventDefault();
|
|
2218
|
+
const reader = new FileReader();
|
|
2219
|
+
reader.onload = () => {
|
|
2220
|
+
try {
|
|
2221
|
+
ed.insertContent(`<img src="${String(reader.result || "")}" alt="${file.name || "pasted image"}">`);
|
|
2222
|
+
} catch {
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
reader.readAsDataURL(file);
|
|
2226
|
+
});
|
|
2206
2227
|
ed.on("GetContent", (e) => {
|
|
2207
2228
|
if (!e?.content || typeof e.content !== "string" || !e.content.includes("blob:"))
|
|
2208
2229
|
return;
|