Skip to content

Commit

Permalink
1,587th Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyam-Chen committed Nov 8, 2024
1 parent 519c58a commit 4aca9bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/src/components/rich-text-editor/RichTextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,18 @@ onChange((files) => {
uploadFile(file);
});
function uploadFile(file: File) {
async function uploadFile(file: File) {
const uploadIndicator = '[Uploading...]';
uploadIndicatorRange.value = {
start: editor.value!.state.selection.from,
end: editor.value!.state.selection.from + uploadIndicator.length,
};
if (!defaultModel.value) defaultModel.value = '<p></p>';
await nextTick();
editor.value?.chain().focus().insertContent(uploadIndicator).run();
editor.value?.on('transaction', updateUploadIndicator);
Expand Down

0 comments on commit 4aca9bd

Please sign in to comment.