From d3b12b6ab83f47153b3ad419c7ae39eb047af01a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 2 Feb 2022 15:17:59 +0000 Subject: [PATCH 01/20] Add new rich text component to BBUI --- packages/bbui/package.json | 1 + .../bbui/src/Form/Core/RichTextField.svelte | 11 +++ packages/bbui/src/Form/Core/index.js | 1 + packages/bbui/src/Form/RichTextField.svelte | 30 ++++++ .../bbui/src/Markdown/MarkdownEditor.svelte | 38 ++++++++ .../bbui/src/Markdown/MarkdownViewer.svelte | 60 ++++++++++++ packages/bbui/src/Markdown/SpectrumMDE.svelte | 94 +++++++++++++++++++ packages/bbui/src/index.js | 3 + packages/bbui/yarn.lock | 52 ++++++++++ 9 files changed, 290 insertions(+) create mode 100644 packages/bbui/src/Form/Core/RichTextField.svelte create mode 100644 packages/bbui/src/Form/RichTextField.svelte create mode 100644 packages/bbui/src/Markdown/MarkdownEditor.svelte create mode 100644 packages/bbui/src/Markdown/MarkdownViewer.svelte create mode 100644 packages/bbui/src/Markdown/SpectrumMDE.svelte diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5cc3ccebeb..91a2a17880 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -79,6 +79,7 @@ "@spectrum-css/underlay": "^2.0.9", "@spectrum-css/vars": "^3.0.1", "dayjs": "^1.10.4", + "easymde": "^2.16.1", "svelte-flatpickr": "^3.2.3", "svelte-portal": "^1.0.0" }, diff --git a/packages/bbui/src/Form/Core/RichTextField.svelte b/packages/bbui/src/Form/Core/RichTextField.svelte new file mode 100644 index 0000000000..33534485d2 --- /dev/null +++ b/packages/bbui/src/Form/Core/RichTextField.svelte @@ -0,0 +1,11 @@ + + + diff --git a/packages/bbui/src/Form/Core/index.js b/packages/bbui/src/Form/Core/index.js index 440c4a1b15..3c3f9acb4d 100644 --- a/packages/bbui/src/Form/Core/index.js +++ b/packages/bbui/src/Form/Core/index.js @@ -10,3 +10,4 @@ export { default as CoreSearch } from "./Search.svelte" export { default as CoreDatePicker } from "./DatePicker.svelte" export { default as CoreDropzone } from "./Dropzone.svelte" export { default as CoreStepper } from "./Stepper.svelte" +export { default as CoreRichTextField } from "./RichTextField.svelte" diff --git a/packages/bbui/src/Form/RichTextField.svelte b/packages/bbui/src/Form/RichTextField.svelte new file mode 100644 index 0000000000..10c9d96139 --- /dev/null +++ b/packages/bbui/src/Form/RichTextField.svelte @@ -0,0 +1,30 @@ + + + + + diff --git a/packages/bbui/src/Markdown/MarkdownEditor.svelte b/packages/bbui/src/Markdown/MarkdownEditor.svelte new file mode 100644 index 0000000000..0b57a6e844 --- /dev/null +++ b/packages/bbui/src/Markdown/MarkdownEditor.svelte @@ -0,0 +1,38 @@ + + + diff --git a/packages/bbui/src/Markdown/MarkdownViewer.svelte b/packages/bbui/src/Markdown/MarkdownViewer.svelte new file mode 100644 index 0000000000..89865346ee --- /dev/null +++ b/packages/bbui/src/Markdown/MarkdownViewer.svelte @@ -0,0 +1,60 @@ + + +
+ +
+ + diff --git a/packages/bbui/src/Markdown/SpectrumMDE.svelte b/packages/bbui/src/Markdown/SpectrumMDE.svelte new file mode 100644 index 0000000000..e7ca40e557 --- /dev/null +++ b/packages/bbui/src/Markdown/SpectrumMDE.svelte @@ -0,0 +1,94 @@ + + +