Skip to content

Commit 92702da

Browse files
committed
fix: save image even if there is only image in rich editor
1 parent 0987432 commit 92702da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

custom/quillEditor.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { useI18n } from 'vue-i18n';
3535
const { t } = useI18n();
3636
function dbg(title: string,...args: any[]) {
3737
// 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)));
3939
}
4040
4141
// blots/embed: Represents inline embed elements, like images or videos that can be inserted into the text flow.
@@ -166,7 +166,7 @@ async function saveToServer(file: File) {
166166
});
167167
if (!success) {
168168
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>
170170
<pre style="white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; max-width: 100%;">${
171171
xhr.responseText.replace(/</g, '&lt;').replace(/>/g, '&gt;')
172172
}</pre>`,
@@ -355,7 +355,8 @@ async function emitTextUpdate() {
355355
await (new Promise((resolve) => setTimeout(resolve, 0)));
356356
const isEmpty = isQuillContentEmpty(html);
357357
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);
359360
}
360361
361362
// Auto-Completion functions

0 commit comments

Comments
 (0)