From 5e6e1d4f3e97ab3f7bffae85e4897231f5794b37 Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Wed, 22 Nov 2023 14:47:46 +0530 Subject: [PATCH] feat(ui): add RTL support in feed editor (#14052) * feat(ui): add RTL support in feed editor * apply rtl on content only --- .../ui/src/components/FeedEditor/FeedEditor.tsx | 12 ++++++++++-- .../src/components/FeedEditor/feed-editor.less | 15 ++++++++++++++- .../ui/src/constants/Feeds.constants.ts | 1 + .../main/resources/ui/src/utils/QuillUtils.js | 16 ++++++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/FeedEditor/FeedEditor.tsx b/openmetadata-ui/src/main/resources/ui/src/components/FeedEditor/FeedEditor.tsx index 200acb18d482..484829fcd8c7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/FeedEditor/FeedEditor.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/FeedEditor/FeedEditor.tsx @@ -34,7 +34,11 @@ import { } from '../../constants/Feeds.constants'; import { HTMLToMarkdown, matcher } from '../../utils/FeedUtils'; import { LinkBlot } from '../../utils/QuillLink/QuillLink'; -import { insertMention, insertRef } from '../../utils/QuillUtils'; +import { + directionHandler, + insertMention, + insertRef, +} from '../../utils/QuillUtils'; import { getEntityIcon } from '../../utils/TableUtils'; import { editorRef } from '../common/RichTextEditor/RichTextEditor.interface'; import './feed-editor.less'; @@ -77,6 +81,7 @@ export const FeedEditor = forwardRef( handlers: { insertMention: insertMention, insertRef: insertRef, + direction: directionHandler, }, }, 'emoji-toolbar': true, @@ -226,7 +231,10 @@ export const FeedEditor = forwardRef( }, [focused, editorRef]); return ( -
+