Merge pull request #858 from Budibase/feature/adds-rich-text-component

Feature/adds rich text component
This commit is contained in:
Kevin Åberg Kultalahti 2020-11-13 12:37:03 +01:00 committed by GitHub
commit d3ea680238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 41 deletions

View File

@ -196,15 +196,7 @@ export default {
// icon: "ri-edit-box-line",
// properties: {
// design: { ...all },
// settings: [
// { label: "Label", key: "label", control: Input },
// {
// label: "Type",
// key: "type",
// control: OptionSelect,
// options: ["text", "password"],
// },
// ],
// settings: [],
// },
// },
{

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

@ -3,8 +3,18 @@
export let _bb
export let label = ""
export let value = ""
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": [
@ -28,7 +38,7 @@
},
"placeholder": "Type something...",
"theme": "snow"
}
</script>
}
</script>
<RichText {options} />
<RichText bind:content {options} />