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