From e42e2d61305256950ad8ab7e4695c619570bdb12 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Tue, 31 Oct 2023 15:50:15 +0530 Subject: [PATCH] chore: new line placeholder classname [skip e2e] --- .../javascripts/Components/SuperEditor/BlocksEditor.tsx | 4 ++-- ...ceholderPlugin.tsx => EmptyLinePlaceholderPlugin.tsx} | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) rename packages/web/src/javascripts/Components/SuperEditor/Plugins/{LinePlaceholderPlugin.tsx => EmptyLinePlaceholderPlugin.tsx} (91%) diff --git a/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx b/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx index 25b852923..ab3285077 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/BlocksEditor.tsx @@ -28,7 +28,7 @@ import TableActionMenuPlugin from './Plugins/TableCellActionMenuPlugin' import ToolbarPlugin from './Plugins/ToolbarPlugin/ToolbarPlugin' import { useMediaQuery, MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/useMediaQuery' import { CheckListPlugin } from './Plugins/List/CheckListPlugin' -import { LinePlaceholderPlugin } from './Plugins/LinePlaceholderPlugin' +import { EmptyLinePlaceholderPlugin } from './Plugins/EmptyLinePlaceholderPlugin' type BlocksEditorProps = { onChange?: (value: string, preview: string) => void @@ -114,7 +114,7 @@ export const BlocksEditor: FunctionComponent = ({ - + {!readonly && floatingAnchorElem && ( <> diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/LinePlaceholderPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/EmptyLinePlaceholderPlugin.tsx similarity index 91% rename from packages/web/src/javascripts/Components/SuperEditor/Plugins/LinePlaceholderPlugin.tsx rename to packages/web/src/javascripts/Components/SuperEditor/Plugins/EmptyLinePlaceholderPlugin.tsx index 2b6c0976f..31cc9a9cd 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/LinePlaceholderPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/EmptyLinePlaceholderPlugin.tsx @@ -11,7 +11,7 @@ import { useCallback, useEffect, useRef } from 'react' import { getSelectedNode } from '../Lexical/Utils/getSelectedNode' import { mergeRegister } from '@lexical/utils' -export const LinePlaceholderPlugin = () => { +export const EmptyLinePlaceholderPlugin = () => { const [editor] = useLexicalComposerContext() const placeholderElementRef = useRef(null) @@ -82,8 +82,11 @@ export const LinePlaceholderPlugin = () => { }, [cursorUpdate, editor]) return ( -
- Type / for +
+ Type / for commands...
)