sets everything up to be used with a longform type in the Form component
This commit is contained in:
parent
53ae428e53
commit
36e902fd30
|
@ -188,25 +188,17 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
_component: "@budibase/standard-components/richtext",
|
// _component: "@budibase/standard-components/richtext",
|
||||||
name: "Rich Text",
|
// name: "Rich Text",
|
||||||
description:
|
// description:
|
||||||
"A component that allows the user to enter long form text.",
|
// "A component that allows the user to enter long form text.",
|
||||||
icon: "ri-edit-box-line",
|
// icon: "ri-edit-box-line",
|
||||||
properties: {
|
// properties: {
|
||||||
design: { ...all },
|
// design: { ...all },
|
||||||
settings: [
|
// settings: [],
|
||||||
{ label: "Label", key: "label", control: Input },
|
// },
|
||||||
{
|
// },
|
||||||
label: "Type",
|
|
||||||
key: "type",
|
|
||||||
control: OptionSelect,
|
|
||||||
options: ["text", "password"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
_component: "@budibase/standard-components/datepicker",
|
_component: "@budibase/standard-components/datepicker",
|
||||||
name: "Date Picker",
|
name: "Date Picker",
|
||||||
|
|
|
@ -178,8 +178,6 @@
|
||||||
"name": "Rich Text",
|
"name": "Rich Text",
|
||||||
"description": "A component that allows the user to enter long form text.",
|
"description": "A component that allows the user to enter long form text.",
|
||||||
"props": {
|
"props": {
|
||||||
"label": "string",
|
|
||||||
"type": "string",
|
|
||||||
"value": "string"
|
"value": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,8 +3,18 @@
|
||||||
|
|
||||||
export let _bb
|
export let _bb
|
||||||
|
|
||||||
export let label = ""
|
export let content = ""
|
||||||
export let value = ""
|
|
||||||
|
const updateValue = content => {
|
||||||
|
if (_bb) {
|
||||||
|
_bb.setBinding("value", content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$: updateValue(content)
|
||||||
|
|
||||||
|
// Need to determine what options we want to expose.
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
"modules": {
|
"modules": {
|
||||||
"toolbar": [
|
"toolbar": [
|
||||||
|
@ -31,4 +41,4 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<RichText {options} />
|
<RichText bind:content {options} />
|
Loading…
Reference in New Issue