feat(editor): allow passing placeholder down
This commit is contained in:
@ -175,12 +175,14 @@ const {
|
||||
isEditEnabled = true,
|
||||
bottomActions = [],
|
||||
showSave = false,
|
||||
placeholder = '',
|
||||
} = defineProps<{
|
||||
modelValue: string,
|
||||
uploadCallback?: UploadCallback,
|
||||
isEditEnabled?: boolean,
|
||||
bottomActions?: BottomAction[],
|
||||
showSave?: boolean,
|
||||
placeholder?: string,
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'save'])
|
||||
@ -269,6 +271,10 @@ const editor = useEditor({
|
||||
if (!isEditEnabled) {
|
||||
return ''
|
||||
}
|
||||
|
||||
if (placeholder !== '') {
|
||||
return placeholder
|
||||
}
|
||||
|
||||
return t('input.editor.placeholder')
|
||||
},
|
||||
|
Reference in New Issue
Block a user