@adminforth/rich-editor 1.6.2 → 1.6.4

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/build.log CHANGED
@@ -10,5 +10,5 @@ custom/package.json
10
10
  custom/quillEditor.vue
11
11
  custom/tsconfig.json
12
12
 
13
- sent 28,577 bytes received 115 bytes 57,384.00 bytes/sec
14
- total size is 28,160 speedup is 0.98
13
+ sent 28,647 bytes received 115 bytes 57,524.00 bytes/sec
14
+ total size is 28,224 speedup is 0.98
@@ -35,7 +35,7 @@ import { useI18n } from 'vue-i18n';
35
35
  const { t } = useI18n();
36
36
  function dbg(title: string,...args: any[]) {
37
37
  // return; // comment for debug
38
- console.log(title, ...args.map(a =>JSON.stringify(a, null, 1)));
38
+ // console.log(title, ...args.map(a =>JSON.stringify(a, null, 1)));
39
39
  }
40
40
 
41
41
  // blots/embed: Represents inline embed elements, like images or videos that can be inserted into the text flow.
@@ -128,7 +128,7 @@ async function saveToServer(file: File) {
128
128
  const originalFilename = file.name.split('.').slice(0, -1).join('.');
129
129
  const originalExtension = file.name.split('.').pop();
130
130
  // send fd to s3
131
- const { uploadUrl, tagline, previewUrl, s3Path, error } = await callAdminForthApi({
131
+ const { uploadUrl, tagline, previewUrl, filePath, error } = await callAdminForthApi({
132
132
  path: `/plugin/${props.meta.uploadPluginInstanceId}/get_file_upload_url`,
133
133
  method: 'POST',
134
134
  body: {
@@ -166,7 +166,7 @@ async function saveToServer(file: File) {
166
166
  });
167
167
  if (!success) {
168
168
  adminforth.alert({
169
- messageHtml: `<div>${t('Sorry but the file was not uploaded because of S3 Request Error:')} </div>
169
+ messageHtml: `<div>${t('Sorry but the file was not uploaded because of storage adapter Request Error:')} </div>
170
170
  <pre style="white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; max-width: 100%;">${
171
171
  xhr.responseText.replace(/</g, '&lt;').replace(/>/g, '&gt;')
172
172
  }</pre>`,
@@ -181,7 +181,7 @@ async function saveToServer(file: File) {
181
181
  const range = quill.getSelection();
182
182
  quill.insertEmbed(range.index, 'image', {
183
183
  url: previewUrl,
184
- s3Path: s3Path,
184
+ s3Path: filePath,
185
185
  alt: file.name
186
186
  }, 'user');
187
187
 
@@ -355,7 +355,8 @@ async function emitTextUpdate() {
355
355
  await (new Promise((resolve) => setTimeout(resolve, 0)));
356
356
  const isEmpty = isQuillContentEmpty(html);
357
357
  dbg('⬆️ emit value suggestion-input', html);
358
- emit('update:value', isEmpty ? '' : html);
358
+ console.log('⬆️ emit value suggestion-input', html);
359
+ emit('update:value', html);
359
360
  }
360
361
 
361
362
  // Auto-Completion functions
@@ -35,7 +35,7 @@ import { useI18n } from 'vue-i18n';
35
35
  const { t } = useI18n();
36
36
  function dbg(title: string,...args: any[]) {
37
37
  // return; // comment for debug
38
- console.log(title, ...args.map(a =>JSON.stringify(a, null, 1)));
38
+ // console.log(title, ...args.map(a =>JSON.stringify(a, null, 1)));
39
39
  }
40
40
 
41
41
  // blots/embed: Represents inline embed elements, like images or videos that can be inserted into the text flow.
@@ -128,7 +128,7 @@ async function saveToServer(file: File) {
128
128
  const originalFilename = file.name.split('.').slice(0, -1).join('.');
129
129
  const originalExtension = file.name.split('.').pop();
130
130
  // send fd to s3
131
- const { uploadUrl, tagline, previewUrl, s3Path, error } = await callAdminForthApi({
131
+ const { uploadUrl, tagline, previewUrl, filePath, error } = await callAdminForthApi({
132
132
  path: `/plugin/${props.meta.uploadPluginInstanceId}/get_file_upload_url`,
133
133
  method: 'POST',
134
134
  body: {
@@ -166,7 +166,7 @@ async function saveToServer(file: File) {
166
166
  });
167
167
  if (!success) {
168
168
  adminforth.alert({
169
- messageHtml: `<div>${t('Sorry but the file was not uploaded because of S3 Request Error:')} </div>
169
+ messageHtml: `<div>${t('Sorry but the file was not uploaded because of storage adapter Request Error:')} </div>
170
170
  <pre style="white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; max-width: 100%;">${
171
171
  xhr.responseText.replace(/</g, '&lt;').replace(/>/g, '&gt;')
172
172
  }</pre>`,
@@ -181,7 +181,7 @@ async function saveToServer(file: File) {
181
181
  const range = quill.getSelection();
182
182
  quill.insertEmbed(range.index, 'image', {
183
183
  url: previewUrl,
184
- s3Path: s3Path,
184
+ s3Path: filePath,
185
185
  alt: file.name
186
186
  }, 'user');
187
187
 
@@ -355,7 +355,8 @@ async function emitTextUpdate() {
355
355
  await (new Promise((resolve) => setTimeout(resolve, 0)));
356
356
  const isEmpty = isQuillContentEmpty(html);
357
357
  dbg('⬆️ emit value suggestion-input', html);
358
- emit('update:value', isEmpty ? '' : html);
358
+ console.log('⬆️ emit value suggestion-input', html);
359
+ emit('update:value', html);
359
360
  }
360
361
 
361
362
  // Auto-Completion functions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/rich-editor",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Rich editor plugin for adminforth",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,9 +24,11 @@
24
24
  "author": "devforth",
25
25
  "license": "ISC",
26
26
  "dependencies": {
27
- "adminforth": "^2.4.0-next.238",
28
27
  "cheerio": "^1.0.0"
29
28
  },
29
+ "peerDependencies": {
30
+ "adminforth": "^2.4.0-next.238"
31
+ },
30
32
  "devDependencies": {
31
33
  "@types/node": "^22.10.7",
32
34
  "semantic-release": "^24.2.1",