diff --git a/packages/builder/src/components/design/AppPreview/componentStructure.json b/packages/builder/src/components/design/AppPreview/componentStructure.json
index 9c34c20a14..96e45ed658 100644
--- a/packages/builder/src/components/design/AppPreview/componentStructure.json
+++ b/packages/builder/src/components/design/AppPreview/componentStructure.json
@@ -13,7 +13,7 @@
"numberfield",
"optionsfield",
"booleanfield",
- "richtext",
+ "longformfield",
"datepicker"
]
},
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/LongFormFieldSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/LongFormFieldSelect.svelte
new file mode 100644
index 0000000000..05a83fe387
--- /dev/null
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/LongFormFieldSelect.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte b/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte
index 74d7837b14..5575ac0b9f 100644
--- a/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/SettingsView.svelte
@@ -21,6 +21,7 @@
import NumberFieldSelect from "./PropertyControls/NumberFieldSelect.svelte"
import OptionsFieldSelect from "./PropertyControls/OptionsFieldSelect.svelte"
import BooleanFieldSelect from "./PropertyControls/BooleanFieldSelect.svelte"
+ import LongFormFieldSelect from "./PropertyControls/LongFormFieldSelect.svelte"
export let componentDefinition = {}
export let componentInstance = {}
@@ -66,6 +67,7 @@
"field/number": NumberFieldSelect,
"field/options": OptionsFieldSelect,
"field/boolean": BooleanFieldSelect,
+ "field/longform": LongFormFieldSelect,
}
const getControl = type => {
diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json
index 09af829621..d0b81cdf13 100644
--- a/packages/standard-components/manifest.json
+++ b/packages/standard-components/manifest.json
@@ -114,13 +114,6 @@
}
]
},
- "richtext": {
- "name": "Rich Text",
- "description": "A component that allows the user to enter long form text.",
- "icon": "ri-edit-box-line",
- "styleable": true,
- "bindable": true
- },
"datepicker": {
"name": "Date Picker",
"description": "A basic date picker component",
@@ -1241,5 +1234,28 @@
"key": "text"
}
]
+ },
+ "longformfield": {
+ "name": "Rich Text",
+ "icon": "ri-edit-box-line",
+ "styleable": true,
+ "settings": [
+ {
+ "type": "field/longform",
+ "label": "Field",
+ "key": "field"
+ },
+ {
+ "type": "text",
+ "label": "Label",
+ "key": "label"
+ },
+ {
+ "type": "text",
+ "label": "Placeholder",
+ "key": "placeholder",
+ "placeholder": "Type something..."
+ }
+ ]
}
}
diff --git a/packages/standard-components/src/RichText.svelte b/packages/standard-components/src/RichText.svelte
deleted file mode 100644
index 3ad66e1703..0000000000
--- a/packages/standard-components/src/RichText.svelte
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
diff --git a/packages/standard-components/src/forms/Form.svelte b/packages/standard-components/src/forms/Form.svelte
index 48684f4cfd..838a0bc2cf 100644
--- a/packages/standard-components/src/forms/Form.svelte
+++ b/packages/standard-components/src/forms/Form.svelte
@@ -49,7 +49,7 @@
setContext("form", { formApi, formState })
// Creates an API for a specific field
- const makeFieldApi = (field, componentId, validate) => {
+ const makeFieldApi = (field, validate) => {
return {
setValue: value => {
const { fieldState } = fieldMap[field]
diff --git a/packages/standard-components/src/forms/LongFormField.svelte b/packages/standard-components/src/forms/LongFormField.svelte
new file mode 100644
index 0000000000..0b2b873760
--- /dev/null
+++ b/packages/standard-components/src/forms/LongFormField.svelte
@@ -0,0 +1,51 @@
+
+
+
+ {#if fieldState}
+
+
+
+ {/if}
+
+
+
diff --git a/packages/standard-components/src/forms/index.js b/packages/standard-components/src/forms/index.js
index 52b7386005..5d0fc1d70c 100644
--- a/packages/standard-components/src/forms/index.js
+++ b/packages/standard-components/src/forms/index.js
@@ -4,3 +4,4 @@ export { default as stringfield } from "./StringField.svelte"
export { default as numberfield } from "./NumberField.svelte"
export { default as optionsfield } from "./OptionsField.svelte"
export { default as booleanfield } from "./BooleanField.svelte"
+export { default as longformfield } from "./LongFormField.svelte"
diff --git a/packages/standard-components/src/index.js b/packages/standard-components/src/index.js
index b0fbf88017..8f0b38f2f1 100644
--- a/packages/standard-components/src/index.js
+++ b/packages/standard-components/src/index.js
@@ -16,7 +16,6 @@ export { default as container } from "./Container.svelte"
export { default as datagrid } from "./grid/Component.svelte"
export { default as screenslot } from "./ScreenSlot.svelte"
export { default as button } from "./Button.svelte"
-export { default as richtext } from "./RichText.svelte"
export { default as list } from "./List.svelte"
export { default as stackedlist } from "./StackedList.svelte"
export { default as card } from "./Card.svelte"