chore: new line placeholder classname [skip e2e]
This commit is contained in:
@@ -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<BlocksEditorProps> = ({
|
||||
<CollapsiblePlugin />
|
||||
<TabIndentationPlugin />
|
||||
<RemoveBrokenTablesPlugin />
|
||||
<LinePlaceholderPlugin />
|
||||
<EmptyLinePlaceholderPlugin />
|
||||
{!readonly && floatingAnchorElem && (
|
||||
<>
|
||||
<DraggableBlockPlugin anchorElem={floatingAnchorElem} />
|
||||
|
||||
@@ -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<HTMLDivElement>(null)
|
||||
@@ -82,8 +82,11 @@ export const LinePlaceholderPlugin = () => {
|
||||
}, [cursorUpdate, editor])
|
||||
|
||||
return (
|
||||
<div className="pointer-events-none fixed text-passive-1 opacity-0" ref={placeholderElementRef}>
|
||||
Type <span className="rounded border border-border bg-passive-4-opacity-variant px-[3px] py-0.5">/</span> for
|
||||
<div
|
||||
className="super-empty-line-placeholder pointer-events-none fixed text-passive-1 opacity-0"
|
||||
ref={placeholderElementRef}
|
||||
>
|
||||
Type <span className="rounded border border-border bg-passive-4-opacity-variant px-1 py-0.5">/</span> for
|
||||
commands...
|
||||
</div>
|
||||
)
|
||||
Reference in New Issue
Block a user