budibase/packages/bbui/src/Form/RichTextField.svelte

37 lines
811 B
Svelte
Raw Normal View History

2022-02-02 16:17:59 +01:00
<script>
import Field from "./Field.svelte"
import RichTextField from "./Core/RichTextField.svelte"
import { createEventDispatcher } from "svelte"
export let value = null
export let label = null
export let labelPosition = "above"
export let placeholder = null
export let disabled = false
export let error = null
export let height = null
export let id = null
export let fullScreenOffset = null
export let easyMDEOptions = null
2022-02-02 16:17:59 +01:00
const dispatch = createEventDispatcher()
const onChange = e => {
value = e.detail
dispatch("change", e.detail)
}
</script>
<Field {label} {labelPosition} {error}>
<RichTextField
{error}
{disabled}
{value}
{placeholder}
{height}
{id}
{fullScreenOffset}
{easyMDEOptions}
2022-02-02 16:17:59 +01:00
on:change={onChange}
/>
</Field>