1
0
Fork 0
mirror of synced 2024-09-20 03:08:18 +12:00
budibase/packages/standard-components/src/RichText.svelte

30 lines
615 B
Svelte
Raw Normal View History

2020-11-13 23:12:38 +13:00
<script>
import { getContext } from "svelte"
import { RichText } from "@budibase/bbui"
2020-11-13 23:12:38 +13:00
const { styleable } = getContext("sdk")
2021-01-20 00:50:13 +13:00
const component = getContext("component")
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={$component.styles}>
<RichText bind:value {options} />
</div>