2020-11-13 11:12:38 +01:00
|
|
|
<script>
|
2020-11-18 22:06:12 +01:00
|
|
|
import { getContext } from "svelte"
|
2020-11-13 15:32:47 +01:00
|
|
|
import { RichText } from "@budibase/bbui"
|
2020-11-13 11:12:38 +01:00
|
|
|
|
2020-11-20 10:50:10 +01:00
|
|
|
const { styleable } = getContext("sdk")
|
2020-11-13 11:31:00 +01:00
|
|
|
|
2020-11-18 22:06:12 +01:00
|
|
|
export let value = ""
|
2020-11-13 11:31:00 +01:00
|
|
|
|
|
|
|
// Need to determine what options we want to expose.
|
|
|
|
let options = {
|
2020-11-13 15:32:47 +01:00
|
|
|
modules: {
|
|
|
|
toolbar: [
|
2020-11-13 11:31:00 +01:00
|
|
|
[
|
|
|
|
{
|
2020-11-13 15:32:47 +01:00
|
|
|
header: [1, 2, 3, false],
|
|
|
|
},
|
2020-11-13 11:31:00 +01:00
|
|
|
],
|
2020-11-13 15:32:47 +01:00
|
|
|
["bold", "italic", "underline", "strike"],
|
|
|
|
],
|
2020-11-13 11:31:00 +01:00
|
|
|
},
|
2020-11-13 15:32:47 +01:00
|
|
|
placeholder: "Type something...",
|
|
|
|
theme: "snow",
|
2020-11-13 11:31:00 +01:00
|
|
|
}
|
|
|
|
</script>
|
2020-11-13 15:32:47 +01:00
|
|
|
|
2020-11-24 12:02:10 +01:00
|
|
|
<div use:styleable={$component.styles}>
|
2020-11-18 22:06:12 +01:00
|
|
|
<RichText bind:content={value} {options} />
|
|
|
|
</div>
|