From 31f340282f5f24b13d21a94307dc81b007051e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 1 Dec 2022 21:32:55 +0100 Subject: [PATCH] wip lexical MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../components/autosuggest-textarea.tsx | 2 +- app/soapbox/components/markup.css | Bin 1434 -> 1453 bytes .../compose/components/compose-form.tsx | 20 +- .../compose/components/upload-form.tsx | 10 +- app/soapbox/features/compose/editor/index.tsx | 72 ++++ app/soapbox/features/compose/editor/nodes.ts | 74 +++++ .../plugins/floating-link-editor-plugin.tsx | 276 ++++++++++++++++ .../floating-text-format-toolbar-plugin.tsx | 311 ++++++++++++++++++ .../compose/editor/plugins/link-plugin.tsx | 18 + .../editor/utils/get-dom-range-rect.ts | 28 ++ .../compose/editor/utils/get-selected-node.ts | 27 ++ .../utils/set-floating-elem-position.ts | 46 +++ .../features/compose/editor/utils/url.ts | 34 ++ app/soapbox/features/ui/index.tsx | 50 +-- app/styles/components/compose-form.scss | 244 ++++++++++++++ app/styles/forms.scss | 5 - package.json | 8 + yarn.lock | 165 +++++++++- 18 files changed, 1346 insertions(+), 44 deletions(-) create mode 100644 app/soapbox/features/compose/editor/index.tsx create mode 100644 app/soapbox/features/compose/editor/nodes.ts create mode 100644 app/soapbox/features/compose/editor/plugins/floating-link-editor-plugin.tsx create mode 100644 app/soapbox/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx create mode 100644 app/soapbox/features/compose/editor/plugins/link-plugin.tsx create mode 100644 app/soapbox/features/compose/editor/utils/get-dom-range-rect.ts create mode 100644 app/soapbox/features/compose/editor/utils/get-selected-node.ts create mode 100644 app/soapbox/features/compose/editor/utils/set-floating-elem-position.ts create mode 100644 app/soapbox/features/compose/editor/utils/url.ts diff --git a/app/soapbox/components/autosuggest-textarea.tsx b/app/soapbox/components/autosuggest-textarea.tsx index 8e877021f4..b79bcd31ba 100644 --- a/app/soapbox/components/autosuggest-textarea.tsx +++ b/app/soapbox/components/autosuggest-textarea.tsx @@ -260,7 +260,7 @@ class AutosuggestTextarea extends ImmutablePureComponent