1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

sets everything up to be used with a longform type in the Form component

This commit is contained in:
kevmodrome 2020-11-13 11:31:00 +01:00
parent 53ae428e53
commit 36e902fd30
3 changed files with 51 additions and 51 deletions

View file

@ -188,25 +188,17 @@ export default {
],
},
},
{
_component: "@budibase/standard-components/richtext",
name: "Rich Text",
description:
"A component that allows the user to enter long form text.",
icon: "ri-edit-box-line",
properties: {
design: { ...all },
settings: [
{ label: "Label", key: "label", control: Input },
{
label: "Type",
key: "type",
control: OptionSelect,
options: ["text", "password"],
},
],
},
},
// {
// _component: "@budibase/standard-components/richtext",
// name: "Rich Text",
// description:
// "A component that allows the user to enter long form text.",
// icon: "ri-edit-box-line",
// properties: {
// design: { ...all },
// settings: [],
// },
// },
{
_component: "@budibase/standard-components/datepicker",
name: "Date Picker",

View file

@ -178,8 +178,6 @@
"name": "Rich Text",
"description": "A component that allows the user to enter long form text.",
"props": {
"label": "string",
"type": "string",
"value": "string"
}
},

View file

@ -1,34 +1,44 @@
<script>
import { RichText } from '@budibase/bbui'
import { RichText } from '@budibase/bbui'
export let _bb
export let label = ""
export let value = ""
let options = {
"modules": {
"toolbar": [
[
{
"header": [
1,
2,
3,
false
]
}
],
[
"bold",
"italic",
"underline",
"strike"
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"
]
]
]
},
"placeholder": "Type something...",
"theme": "snow"
}
</script>
},
"placeholder": "Type something...",
"theme": "snow"
}
</script>
<RichText {options} />
<RichText bind:content {options} />