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
|
2022-02-02 22:22:49 +01:00
|
|
|
export let id = null
|
2022-02-07 13:49:33 +01:00
|
|
|
export let fullScreenOffset = null
|
2022-02-04 15:25:20 +01:00
|
|
|
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}
|
2022-02-02 22:22:49 +01:00
|
|
|
{id}
|
2022-02-03 12:53:51 +01:00
|
|
|
{fullScreenOffset}
|
2022-02-04 15:25:20 +01:00
|
|
|
{easyMDEOptions}
|
2022-02-02 16:17:59 +01:00
|
|
|
on:change={onChange}
|
|
|
|
/>
|
|
|
|
</Field>
|