ep_images_extended 1.1.0 → 1.1.2

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/ep.json CHANGED
@@ -22,15 +22,12 @@
22
22
  "hooks":{
23
23
  "clientVars": "ep_images_extended/index",
24
24
  "eejsBlock_body": "ep_images_extended/index",
25
- "getLineHTMLForExport": "ep_images_extended/exportHTML",
26
- "stylesForExport": "ep_images_extended/exportHTML",
27
25
  "expressConfigure": "ep_images_extended/index",
28
26
  "eejsBlock_editbarMenuLeft": "ep_images_extended/editbar",
29
27
  "loadSettings": "ep_images_extended/settings",
30
28
  "collectContentPre": "ep_images_extended/static/js/contentCollection",
31
29
  "eejsBlock_styles": "ep_images_extended/index",
32
- "eejsBlock_timesliderStyles": "ep_images_extended/index",
33
- "ccRegisterBlockElements": "ep_images_extended/index"
30
+ "eejsBlock_timesliderStyles": "ep_images_extended/index"
34
31
  }
35
32
  }
36
33
  ]
package/index.js CHANGED
@@ -280,9 +280,4 @@ exports.expressConfigure = (hookName, context) => {
280
280
  // ---------------------------------------------------------------------
281
281
  };
282
282
 
283
- /**
284
- * Hook to tell Etherpad that 'img' tags are supported during import.
285
- */
286
- exports.ccRegisterBlockElements = (hookName, context, cb) => {
287
- return cb(['img']);
288
- };
283
+ // Import/export hooks removed - ccRegisterBlockElements was here
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep_images_extended",
3
3
  "description": "Insert images inline with text, float them, resize them, and more.",
4
- "version": "1.1.0",
4
+ "version": "1.1.2",
5
5
  "author": {
6
6
  "name": "DCastelone",
7
7
  "url": "https://github.com/dcastelone"
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
  // Modified from ep_image_insert 1.0.7
3
3
 
4
+ console.log('ep_images_extended version 1.1.1');
5
+
4
6
  // Optional helper (shared with ep_docx_html_customizer) that provides a CORS fetch with
5
7
  // automatic same-origin proxy fallback. If the plugin is not present we simply fall back
6
8
  // to the native fetch logic.
@@ -892,8 +894,8 @@ exports.postAceInit = function (hook, context) {
892
894
  if (isValid) {
893
895
  evt.preventDefault();
894
896
 
895
- // Determine storage strategy (default base64)
896
- const storageType = (clientVars && clientVars.ep_images_extended && clientVars.ep_images_extended.storageType) || 'base64';
897
+ // Determine storage strategy (default to s3_presigned)
898
+ const storageType = (clientVars && clientVars.ep_images_extended && clientVars.ep_images_extended.storageType) || 's3_presigned';
897
899
 
898
900
  // Global cache to avoid re-uploading the same blob within a pad session
899
901
  window.epImageInsertUploadCache = window.epImageInsertUploadCache || {};
@@ -964,8 +966,8 @@ exports.postAceInit = function (hook, context) {
964
966
  probeImg.onerror = () => insertIntoPad(publicUrl);
965
967
  probeImg.src = publicUrl;
966
968
  } catch (err) {
967
- console.error('[ep_images_extended paste] S3 upload failed, falling back to base64:', err);
968
- insertAsDataUrl(file);
969
+ console.error('[ep_images_extended paste] S3 upload failed and base64 is disabled:', err);
970
+ $.gritter.add({ title: errorTitle, text: 'Image upload to S3 failed. Base64 is disabled.', sticky: true, class_name: 'error' });
969
971
  }
970
972
  })();
971
973
  } else {
@@ -996,8 +998,8 @@ exports.postAceInit = function (hook, context) {
996
998
  probeImg.onerror = () => insertIntoPad(publicUrl);
997
999
  probeImg.src = publicUrl;
998
1000
  } catch (err) {
999
- console.error('[ep_images_extended paste] Server upload failed, falling back to base64:', err);
1000
- insertAsDataUrl(file);
1001
+ console.error('[ep_images_extended paste] Server upload failed and base64 is disabled:', err);
1002
+ $.gritter.add({ title: errorTitle, text: 'Image upload failed. Base64 is disabled.', sticky: true, class_name: 'error' });
1001
1003
  }
1002
1004
  })();
1003
1005
  }