@bobfrankston/rmfmail 1.1.225 → 1.1.228

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.
Files changed (44) hide show
  1. package/client/compose/compose.bundle.js +22 -10
  2. package/client/compose/compose.bundle.js.map +2 -2
  3. package/client/lib/rmf-tiny.js +35 -10
  4. package/client/lib/tinymce/CHANGELOG.md +12 -0
  5. package/client/lib/tinymce/composer.json +1 -1
  6. package/client/lib/tinymce/models/dom/model.js +1 -1
  7. package/client/lib/tinymce/package.json +1 -1
  8. package/client/lib/tinymce/plugins/accordion/plugin.js +1 -1
  9. package/client/lib/tinymce/plugins/advlist/plugin.js +1 -1
  10. package/client/lib/tinymce/plugins/anchor/plugin.js +1 -1
  11. package/client/lib/tinymce/plugins/autolink/plugin.js +1 -1
  12. package/client/lib/tinymce/plugins/autoresize/plugin.js +1 -1
  13. package/client/lib/tinymce/plugins/autosave/plugin.js +1 -1
  14. package/client/lib/tinymce/plugins/charmap/plugin.js +1 -1
  15. package/client/lib/tinymce/plugins/code/plugin.js +1 -1
  16. package/client/lib/tinymce/plugins/codesample/plugin.js +1 -1
  17. package/client/lib/tinymce/plugins/directionality/plugin.js +1 -1
  18. package/client/lib/tinymce/plugins/emoticons/plugin.js +1 -1
  19. package/client/lib/tinymce/plugins/fullscreen/plugin.js +1 -1
  20. package/client/lib/tinymce/plugins/help/plugin.js +1 -1
  21. package/client/lib/tinymce/plugins/image/plugin.js +1 -1
  22. package/client/lib/tinymce/plugins/importcss/plugin.js +1 -1
  23. package/client/lib/tinymce/plugins/insertdatetime/plugin.js +1 -1
  24. package/client/lib/tinymce/plugins/link/plugin.js +1 -1
  25. package/client/lib/tinymce/plugins/lists/plugin.js +1 -1
  26. package/client/lib/tinymce/plugins/media/plugin.js +66 -41
  27. package/client/lib/tinymce/plugins/media/plugin.min.js +1 -1
  28. package/client/lib/tinymce/plugins/nonbreaking/plugin.js +1 -1
  29. package/client/lib/tinymce/plugins/pagebreak/plugin.js +1 -1
  30. package/client/lib/tinymce/plugins/preview/plugin.js +1 -1
  31. package/client/lib/tinymce/plugins/quickbars/plugin.js +1 -1
  32. package/client/lib/tinymce/plugins/save/plugin.js +1 -1
  33. package/client/lib/tinymce/plugins/searchreplace/plugin.js +1 -1
  34. package/client/lib/tinymce/plugins/table/plugin.js +1 -1
  35. package/client/lib/tinymce/plugins/visualblocks/plugin.js +1 -1
  36. package/client/lib/tinymce/plugins/visualchars/plugin.js +1 -1
  37. package/client/lib/tinymce/plugins/wordcount/plugin.js +1 -1
  38. package/client/lib/tinymce/themes/silver/theme.js +345 -155
  39. package/client/lib/tinymce/themes/silver/theme.min.js +3 -1
  40. package/client/lib/tinymce/tinymce.js +393 -171
  41. package/client/lib/tinymce/tinymce.min.js +4 -2
  42. package/docs/outlook.md +215 -0
  43. package/package.json +3 -3
  44. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-62732 → node_modules.npmglobalize-stash-126048}/.package-lock.json +0 -0
@@ -2084,17 +2084,17 @@ async function createTinyMceEditor(container2, opts = {}) {
2084
2084
  };
2085
2085
  const BORDER_STYLES = { "border": "1px solid #888", "border-radius": "4px", "padding": "10px" };
2086
2086
  const openCodeDialog = () => {
2087
- const cs = ed.plugins.codesample;
2088
2087
  const preEl = ed.dom.getParent(ed.selection.getNode(), "pre");
2089
2088
  let curLang = "text";
2090
2089
  let curBorder = false;
2090
+ let curCode = "";
2091
2091
  if (preEl) {
2092
2092
  const m = (preEl.className || "").match(/language-([\w-]+)/);
2093
2093
  if (m)
2094
2094
  curLang = m[1];
2095
2095
  curBorder = !!(preEl.style && preEl.style.border && preEl.style.border !== "none");
2096
+ curCode = preEl.textContent || "";
2096
2097
  }
2097
- const curCode = cs && cs.getCurrentCode ? cs.getCurrentCode(ed) || "" : "";
2098
2098
  ed.windowManager.open({
2099
2099
  title: "Insert code",
2100
2100
  size: "large",
@@ -2113,15 +2113,16 @@ async function createTinyMceEditor(container2, opts = {}) {
2113
2113
  ],
2114
2114
  onSubmit: (api) => {
2115
2115
  const data = api.getData();
2116
- if (cs && cs.insertCodeSample)
2117
- cs.insertCodeSample(data.language, data.code);
2118
- const pre = ed.dom.getParent(ed.selection.getNode(), "pre");
2119
- if (pre) {
2120
- if (data.border)
2121
- ed.dom.setStyles(pre, BORDER_STYLES);
2122
- else
2123
- ed.dom.setStyles(pre, { "border": "", "border-radius": "", "padding": "" });
2116
+ const lang = data.language || "text";
2117
+ const esc = (s) => String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2118
+ const borderStyle = data.border ? ` style="${Object.entries(BORDER_STYLES).map(([k, v]) => `${k}:${v}`).join(";")}"` : "";
2119
+ const html = `<pre class="language-${lang}"${borderStyle}><code>${esc(data.code || "")}</code></pre>`;
2120
+ if (preEl && preEl.parentNode) {
2121
+ ed.dom.setOuterHTML(preEl, html);
2122
+ } else {
2123
+ ed.insertContent(html);
2124
2124
  }
2125
+ ed.undoManager.add();
2125
2126
  api.close();
2126
2127
  }
2127
2128
  });
@@ -2260,6 +2261,17 @@ async function createTinyMceEditor(container2, opts = {}) {
2260
2261
  getText() {
2261
2262
  return editor2.getContent({ format: "text" });
2262
2263
  },
2264
+ /** Subscribe to content changes. compose.ts calls this to drive draft
2265
+ * auto-save; it was MISSING from the facade, so the call threw
2266
+ * "editor.onContentChange is not a function" during compose init —
2267
+ * aborting the rest of init and leaving change-tracking unwired, so
2268
+ * edits made via dialogs (Insert code, Source code) were never
2269
+ * captured into the draft and looked "ignored" (Bob 2026-06-06).
2270
+ * `SetContent`/`ExecCommand` are the load-bearing events here: they're
2271
+ * what the codesample + code (source) dialogs fire on apply. */
2272
+ onContentChange(handler) {
2273
+ editor2.on("input change undo redo keyup SetContent ExecCommand AddUndo", () => handler());
2274
+ },
2263
2275
  focus() {
2264
2276
  editor2.focus();
2265
2277
  },