@richscripts/richtexteditor 2.8.0 → 2.9.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.
- package/package.json +1 -1
- package/richtexteditor/all_plugins.js +1020 -719
- package/richtexteditor/all_plugins.min.js +41 -41
- package/richtexteditor/plugins/accessibilitychecker.js +7 -0
- package/richtexteditor/plugins/all_plugins.js +1020 -719
- package/richtexteditor/plugins/all_plugins.min.js +41 -41
- package/richtexteditor/plugins/autoembed.js +7 -0
- package/richtexteditor/plugins/blocktypes.js +7 -0
- package/richtexteditor/plugins/bookmarkcard.js +7 -0
- package/richtexteditor/plugins/charlimit.js +7 -0
- package/richtexteditor/plugins/comments.js +14 -0
- package/richtexteditor/plugins/contentminimap.js +7 -0
- package/richtexteditor/plugins/crossreference.js +7 -0
- package/richtexteditor/plugins/dictation.js +7 -0
- package/richtexteditor/plugins/documentoutline.js +9 -3
- package/richtexteditor/plugins/draghandle.js +7 -0
- package/richtexteditor/plugins/foldheadings.js +7 -0
- package/richtexteditor/plugins/footnotes.js +7 -0
- package/richtexteditor/plugins/formatpainter.js +7 -0
- package/richtexteditor/plugins/formattingmarks.js +7 -0
- package/richtexteditor/plugins/gapcursor.js +7 -0
- package/richtexteditor/plugins/ghostcomplete.js +7 -0
- package/richtexteditor/plugins/layouttable.js +7 -0
- package/richtexteditor/plugins/linenumbers.js +7 -0
- package/richtexteditor/plugins/linkchecker.js +7 -0
- package/richtexteditor/plugins/mentionplugin.js +14 -0
- package/richtexteditor/plugins/mergefields.js +7 -0
- package/richtexteditor/plugins/mermaiddiagram.js +7 -0
- package/richtexteditor/plugins/multilevellist.js +7 -0
- package/richtexteditor/plugins/pagination.js +7 -0
- package/richtexteditor/plugins/restrictedediting.js +7 -0
- package/richtexteditor/plugins/revisionhistory.js +7 -0
- package/richtexteditor/plugins/rtlui.js +7 -0
- package/richtexteditor/plugins/slashcommand.js +7 -0
- package/richtexteditor/plugins/smartchips.js +7 -0
- package/richtexteditor/plugins/spellcheck.js +7 -0
- package/richtexteditor/plugins/tableofcontents.js +7 -0
- package/richtexteditor/plugins/textdirection.js +7 -0
- package/richtexteditor/plugins/textpartlanguage.js +7 -0
- package/richtexteditor/plugins/todolist.js +7 -0
- package/richtexteditor/plugins/trackedchanges.js +730 -716
- package/richtexteditor/plugins/typewriter.js +7 -0
- package/richtexteditor/plugins/watermark.js +15 -0
- package/richtexteditor/plugins/yjscollab.js +7 -0
- 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
|
}
|