implement image upload
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user