- MLField.vue is the one locale-switching wrapper; MLTextField, MLMarkdownField and the new MLTextareaField are shells around it - isMLFieldType replaces the inline ML type-name checks in formState, FormView and RelationChildModal - register mltextarea as a group-labelled control; rebuild dist
20 lines
558 B
Vue
20 lines
558 B
Vue
<script setup lang="ts">
|
|
// The mlmarkdown control: MLField around MarkdownField.
|
|
import type { FieldControlProps } from '../control'
|
|
import MLField from './MLField.vue'
|
|
import MarkdownField from './MarkdownField.vue'
|
|
|
|
const props = defineProps<FieldControlProps>()
|
|
const emit = defineEmits<{ 'update:modelValue': [value: Record<string, string>] }>()
|
|
</script>
|
|
|
|
<template>
|
|
<MLField
|
|
v-bind="props"
|
|
:inner="MarkdownField"
|
|
inner-type="markdown"
|
|
ml-type="mlmarkdown"
|
|
@update:model-value="emit('update:modelValue', $event)"
|
|
/>
|
|
</template>
|