@richscripts/richtexteditor 2.9.0 → 2.11.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 CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.9.0",
6
+ "version": "2.11.0",
7
7
  "description": "A full-featured JavaScript rich text editor (WYSIWYG) with toolbar, plugins, i18n support, a built-in AI Toolkit (Ask AI, AI Chat, AI Review drawer, BYOK resolver), structured content APIs (JSON/Markdown), and an optional collaboration / review stack: slash commands, @mentions, human-author Track Changes, threaded comments, revision history, and Yjs-backed presence. Ships first-class React, Vue, Angular and Svelte bindings, a headless \"bring your own UI\" core, and server-safe conversion helpers.",
8
8
  "main": "./richtexteditor/rte.js",
9
9
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "artifact:migration": "node scripts/build-migration-fidelity-artifact.js",
18
18
  "artifact:migration:runtime": "npm --prefix vendor-runtime-tests ci && npm --prefix vendor-runtime-tests run generate && node scripts/build-migration-fidelity-artifact.js",
19
19
  "guard:protected": "node tests/guard-protected-bundle.js",
20
- "prepublishOnly": "node tests/guard-protected-bundle.js"
20
+ "prepublishOnly": "node tests/guard-protected-bundle.js && node tests/guard-version-tie.js"
21
21
  },
22
22
  "types": "./index.d.ts",
23
23
  "style": "./richtexteditor/rte_theme_default.css",
@@ -29461,7 +29461,8 @@ function RTE_Plugin_ImageEditor() {
29461
29461
  savebtn.innerText = "Saving...";
29462
29462
 
29463
29463
  var dataurl = imgeditor.toDataURL();
29464
- if (!config.file_upload_handler) {
29464
+ var uploadHandler = config.file_upload_handler || window.rte_file_upload_handler;
29465
+ if (!uploadHandler) {
29465
29466
  img.src = dataurl;
29466
29467
  editor.notifySelectionChange();
29467
29468
  dialoginner.close();
@@ -29470,7 +29471,7 @@ function RTE_Plugin_ImageEditor() {
29470
29471
 
29471
29472
  var file = dataURLToBlob(dataurl);
29472
29473
 
29473
- config.file_upload_handler(file, function (url, error) {
29474
+ uploadHandler(file, function (url, error) {
29474
29475
  if (url) {
29475
29476
  img.src = url;
29476
29477
  editor.notifySelectionChange();
@@ -39440,6 +39441,12 @@ function RTE_Plugin_RubyAnnotation() {
39440
39441
  "@supports (display:ruby){.rte-ruby-annotated>rp{display:none;}}"
39441
39442
  ].join("");
39442
39443
  hostDoc.head.appendChild(style);
39444
+ // A <style> element's rules are dropped under a strict style-src; this
39445
+ // re-injects them through the CSSOM in that case only. Missed in 2.9.0,
39446
+ // found by auditing the FULL bundle rather than a sample of plugins.
39447
+ if (editor && typeof editor.ensureStyleSheetLive === "function") {
39448
+ editor.ensureStyleSheetLive(hostDoc, style, "rte-ruby-style", style.textContent);
39449
+ }
39443
39450
  }
39444
39451
 
39445
39452
  function editableRoot() {
@@ -42415,6 +42422,12 @@ function RTE_Plugin_StateInspector() {
42415
42422
  "@media (max-width: 1100px){.rte-state-inspector-shell{display:block;}.rte-state-inspector-panel{margin-top:12px;max-width:none;width:100%;}.rte-state-inspector-body{max-height:340px;}}"
42416
42423
  ].join("");
42417
42424
  hostDoc.head.appendChild(style);
42425
+ // A <style> element's rules are dropped under a strict style-src; this
42426
+ // re-injects them through the CSSOM in that case only. Missed in 2.9.0,
42427
+ // found by auditing the FULL bundle rather than a sample of plugins.
42428
+ if (editor && typeof editor.ensureStyleSheetLive === "function") {
42429
+ editor.ensureStyleSheetLive(hostDoc, style, "rte-state-inspector-style", style.textContent);
42430
+ }
42418
42431
  }
42419
42432
 
42420
42433
  function ensureShell() {