diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index ed9bba0d35..18190c89e3 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -62,10 +62,7 @@
"@spectrum-css/underlay": "^2.0.9",
"@spectrum-css/vars": "^3.0.1",
"dayjs": "^1.10.4",
- "markdown-it": "^12.0.4",
- "quill": "^1.3.7",
"svelte-flatpickr": "^2.4.0",
- "svelte-portal": "^1.0.0",
- "turndown": "^7.0.0"
+ "svelte-portal": "^1.0.0"
}
}
diff --git a/packages/bbui/src/Form/Core/TextArea.svelte b/packages/bbui/src/Form/Core/TextArea.svelte
new file mode 100644
index 0000000000..4d206d291b
--- /dev/null
+++ b/packages/bbui/src/Form/Core/TextArea.svelte
@@ -0,0 +1,48 @@
+
+
+
+ {#if error}
+
+ {/if}
+
+
+
+
diff --git a/packages/bbui/src/Form/Core/index.js b/packages/bbui/src/Form/Core/index.js
index 95971a2560..7e3bf39c2a 100644
--- a/packages/bbui/src/Form/Core/index.js
+++ b/packages/bbui/src/Form/Core/index.js
@@ -3,3 +3,4 @@ export { default as CoreSelect } from "./Select.svelte"
export { default as CoreMultiselect } from "./Multiselect.svelte"
export { default as CoreCheckbox } from "./Checkbox.svelte"
export { default as CoreRadioGroup } from "./RadioGroup.svelte"
+export { default as CoreTextArea } from "./TextArea.svelte"
diff --git a/packages/bbui/src/Form/RadioGroup.svelte b/packages/bbui/src/Form/RadioGroup.svelte
index 227555c802..619a0469e5 100644
--- a/packages/bbui/src/Form/RadioGroup.svelte
+++ b/packages/bbui/src/Form/RadioGroup.svelte
@@ -4,7 +4,7 @@
import { createEventDispatcher } from "svelte"
export let value = null
- export let label = undefined
+ export let label = null
export let disabled = false
export let labelPosition = "above"
export let error = null
diff --git a/packages/bbui/src/Form/RichText.svelte b/packages/bbui/src/Form/RichText.svelte
deleted file mode 100644
index ab4b9c3d99..0000000000
--- a/packages/bbui/src/Form/RichText.svelte
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
- {#if mergedOptions.theme !== 'snow'}
-
- {/if}
-
-
-
diff --git a/packages/bbui/src/Form/TextArea.svelte b/packages/bbui/src/Form/TextArea.svelte
index 1133a99127..e3713d1d16 100644
--- a/packages/bbui/src/Form/TextArea.svelte
+++ b/packages/bbui/src/Form/TextArea.svelte
@@ -1,132 +1,29 @@
-
- {#if label || edit}
-
- {#if label}
-
- {/if}
- {#if edit}
-
-
-
-
- {/if}
-
- {/if}
-
-
-
+ {updateOnChange}
+ on:change={onChange} />
+
diff --git a/packages/bbui/src/Modal/Modal.svelte b/packages/bbui/src/Modal/Modal.svelte
index 5f31e9a27e..185a695c3c 100644
--- a/packages/bbui/src/Modal/Modal.svelte
+++ b/packages/bbui/src/Modal/Modal.svelte
@@ -32,7 +32,7 @@
async function focusFirstInput(node) {
const inputs = node.querySelectorAll("input")
- if (inputs) {
+ if (inputs?.length) {
await tick()
inputs[0].focus()
}
diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js
index 616f313d3f..36ef513b93 100644
--- a/packages/bbui/src/index.js
+++ b/packages/bbui/src/index.js
@@ -3,7 +3,6 @@ import "./bbui.css"
// Components
export { default as Input } from "./Form/Input.svelte"
export { default as TextArea } from "./Form/TextArea.svelte"
-export { default as RichText } from "./Form/RichText.svelte"
export { default as Select } from "./Form/Select.svelte"
export { default as DataList } from "./Form/DataList.svelte"
export { default as Dropzone } from "./Dropzone/Dropzone.svelte"
diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte
index 1c5509544e..f2568db5e6 100644
--- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte
+++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte
@@ -5,7 +5,7 @@
Label,
DatePicker,
Toggle,
- RichText,
+ TextArea,
} from "@budibase/bbui"
import Dropzone from "components/common/Dropzone.svelte"
import { capitalise } from "../../../helpers"
@@ -40,10 +40,7 @@
{:else if type === 'longform'}
-
-
-
-
+
{:else}
- import { onMount } from "svelte"
- import { RichText } from "@budibase/bbui"
+ import { CoreTextArea } from "@budibase/bbui"
import Field from "./Field.svelte"
export let field
@@ -10,33 +9,6 @@
let fieldState
let fieldApi
-
- // Update form value from bound value after we've mounted
- let value
- let mounted = false
- $: mounted && fieldApi?.setValue(value)
-
- // Get the fields initial value after initialising
- onMount(() => {
- value = $fieldState?.value
- mounted = true
- })
-
- // Options for rich text component
- const options = {
- modules: {
- toolbar: [
- [
- {
- header: [1, 2, 3, false],
- },
- ],
- ["bold", "italic", "underline", "strike"],
- ],
- },
- placeholder: placeholder || "Type something...",
- theme: "snow",
- }
- {#if mounted}
-
-
-
+ {#if fieldState}
+ fieldApi.setValue(e.detail)}
+ updateOnChange={false}
+ disabled={$fieldState.disabled}
+ error={$fieldState.error}
+ id={$fieldState.fieldId}
+ {placeholder} />
{/if}
-
-
diff --git a/packages/standard-components/vite.config.js b/packages/standard-components/vite.config.js
index 7e04595968..2eecfbaf44 100644
--- a/packages/standard-components/vite.config.js
+++ b/packages/standard-components/vite.config.js
@@ -12,7 +12,12 @@ export default ({ mode }) => {
},
minify: isProduction,
},
- plugins: [svelte()],
+ plugins: [
+ svelte({
+ hot: !isProduction,
+ emitCss: true,
+ }),
+ ],
resolve: {
dedupe: ["svelte", "svelte/internal"],
},