1
0

feat(editor): allow passing placeholder down

This commit is contained in:
kolaente
2023-10-21 19:33:32 +02:00
parent 1443e23f18
commit daa2ed3b1c
2 changed files with 11 additions and 5 deletions

View File

@ -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')
},