@richscripts/richtexteditor 2.8.0 → 2.10.0

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 (47) hide show
  1. package/package.json +1 -1
  2. package/richtexteditor/all_plugins.js +1032 -719
  3. package/richtexteditor/all_plugins.min.js +41 -41
  4. package/richtexteditor/plugins/accessibilitychecker.js +7 -0
  5. package/richtexteditor/plugins/all_plugins.js +1032 -719
  6. package/richtexteditor/plugins/all_plugins.min.js +41 -41
  7. package/richtexteditor/plugins/autoembed.js +7 -0
  8. package/richtexteditor/plugins/blocktypes.js +7 -0
  9. package/richtexteditor/plugins/bookmarkcard.js +7 -0
  10. package/richtexteditor/plugins/charlimit.js +7 -0
  11. package/richtexteditor/plugins/comments.js +14 -0
  12. package/richtexteditor/plugins/contentminimap.js +7 -0
  13. package/richtexteditor/plugins/crossreference.js +7 -0
  14. package/richtexteditor/plugins/dictation.js +7 -0
  15. package/richtexteditor/plugins/documentoutline.js +9 -3
  16. package/richtexteditor/plugins/draghandle.js +7 -0
  17. package/richtexteditor/plugins/foldheadings.js +7 -0
  18. package/richtexteditor/plugins/footnotes.js +7 -0
  19. package/richtexteditor/plugins/formatpainter.js +7 -0
  20. package/richtexteditor/plugins/formattingmarks.js +7 -0
  21. package/richtexteditor/plugins/gapcursor.js +7 -0
  22. package/richtexteditor/plugins/ghostcomplete.js +7 -0
  23. package/richtexteditor/plugins/layouttable.js +7 -0
  24. package/richtexteditor/plugins/linenumbers.js +7 -0
  25. package/richtexteditor/plugins/linkchecker.js +7 -0
  26. package/richtexteditor/plugins/mentionplugin.js +14 -0
  27. package/richtexteditor/plugins/mergefields.js +7 -0
  28. package/richtexteditor/plugins/mermaiddiagram.js +7 -0
  29. package/richtexteditor/plugins/multilevellist.js +7 -0
  30. package/richtexteditor/plugins/pagination.js +7 -0
  31. package/richtexteditor/plugins/restrictedediting.js +7 -0
  32. package/richtexteditor/plugins/revisionhistory.js +7 -0
  33. package/richtexteditor/plugins/rtlui.js +7 -0
  34. package/richtexteditor/plugins/rubyannotation.js +6 -0
  35. package/richtexteditor/plugins/slashcommand.js +7 -0
  36. package/richtexteditor/plugins/smartchips.js +7 -0
  37. package/richtexteditor/plugins/spellcheck.js +7 -0
  38. package/richtexteditor/plugins/stateinspector.js +6 -0
  39. package/richtexteditor/plugins/tableofcontents.js +7 -0
  40. package/richtexteditor/plugins/textdirection.js +7 -0
  41. package/richtexteditor/plugins/textpartlanguage.js +7 -0
  42. package/richtexteditor/plugins/todolist.js +7 -0
  43. package/richtexteditor/plugins/trackedchanges.js +730 -716
  44. package/richtexteditor/plugins/typewriter.js +7 -0
  45. package/richtexteditor/plugins/watermark.js +15 -0
  46. package/richtexteditor/plugins/yjscollab.js +7 -0
  47. package/richtexteditor/rte.js +2 -2
@@ -174,6 +174,13 @@ function RTE_Plugin_Typewriter() {
174
174
  st.id = "rte-typewriter-styles";
175
175
  st.appendChild(doc.createTextNode(css));
176
176
  (doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement).appendChild(st);
177
+ // A <style> ELEMENT is governed by style-src: under a strict policy the browser
178
+ // drops its rules, leaving this plugin's UI unstyled. The element above stays
179
+ // the path everyone else takes; this re-injects through the CSSOM only when
180
+ // the policy actually emptied it.
181
+ if (editor && typeof editor.ensureStyleSheetLive === "function") {
182
+ editor.ensureStyleSheetLive(doc, st, "rte-typewriter-styles", st.textContent);
183
+ }
177
184
  }
178
185
 
179
186
  // Strip the transient focus class around any serialize so saved markup never
@@ -159,6 +159,14 @@ function RTE_Plugin_Watermark() {
159
159
  ? ""
160
160
  : "@media print{[data-rte-watermark]{background-image:none !important;}" +
161
161
  "[data-rte-watermark]::before{display:none !important;}}");
162
+ // Skipped by the scripted conversion on purpose: this element is reused
163
+ // and its text is rewritten on every watermark change, so the guard has to
164
+ // sit after the assignment rather than after the append. Same contract as
165
+ // everywhere else - the element stays primary, the CSSOM path fires only
166
+ // when a strict style-src emptied it.
167
+ if (editor && typeof editor.ensureStyleSheetLive === "function") {
168
+ editor.ensureStyleSheetLive(doc, st, "rte-watermark-dynamic", st.textContent);
169
+ }
162
170
  }
163
171
 
164
172
  // ---- serialization safety -------------------------------------------
@@ -210,5 +218,12 @@ function RTE_Plugin_Watermark() {
210
218
  st.id = "rte-watermark-styles";
211
219
  st.appendChild(doc.createTextNode("[data-rte-watermark]{position:relative;}"));
212
220
  (doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement).appendChild(st);
221
+ // A <style> ELEMENT is governed by style-src: under a strict policy the browser
222
+ // drops its rules, leaving this plugin's UI unstyled. The element above stays
223
+ // the path everyone else takes; this re-injects through the CSSOM only when
224
+ // the policy actually emptied it.
225
+ if (editor && typeof editor.ensureStyleSheetLive === "function") {
226
+ editor.ensureStyleSheetLive(doc, st, "rte-watermark-styles", st.textContent);
227
+ }
213
228
  }
214
229
  }
@@ -838,5 +838,12 @@ function RTE_Plugin_YjsCollab() {
838
838
  ".rte-collab-presence-chip.is-self{outline:2px solid rgba(15,23,42,.25);outline-offset:1px}"
839
839
  ].join("\n");
840
840
  document.head.appendChild(style);
841
+ // A <style> ELEMENT is governed by style-src: under a strict policy the browser
842
+ // drops its rules, leaving this plugin's UI unstyled. The element above stays
843
+ // the path everyone else takes; this re-injects through the CSSOM only when
844
+ // the policy actually emptied it.
845
+ if (editor && typeof editor.ensureStyleSheetLive === "function") {
846
+ editor.ensureStyleSheetLive(document, style, "rte-yjscollab-style", style.textContent);
847
+ }
841
848
  }
842
849
  }