budibase/packages/standard-components/src/RichText.svelte

29 lines
570 B
Svelte
Raw Normal View History

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