implement image upload

This commit is contained in:
2025-06-24 17:16:13 +00:00
parent 90fc8bed35
commit fca3638f7f
5 changed files with 321 additions and 13 deletions

View File

@@ -533,6 +533,10 @@ export class DeesInputWysiwyg extends DeesInputBase<string> {
currentBlock.metadata = { listType: 'bullet' };
// For lists, ensure we start with empty content
currentBlock.content = '';
} else if (type === 'image') {
// For image blocks, clear content and set empty metadata
currentBlock.content = '';
currentBlock.metadata = { url: '', loading: false };
} else {
// For all other block types, ensure content is clean
currentBlock.content = currentBlock.content || '';
@@ -556,8 +560,11 @@ export class DeesInputWysiwyg extends DeesInputBase<string> {
blockComponent.focusListItem();
}
});
} else if (type !== 'divider') {
} else if (type !== 'divider' && type !== 'image') {
this.blockOperations.focusBlock(currentBlock.id, 'start');
} else if (type === 'image') {
// Focus the image block (which will show the upload interface)
this.blockOperations.focusBlock(currentBlock.id);
}
}