refactor: inner blocks note links (#1973)
This commit is contained in:
@@ -25,6 +25,9 @@ import YouTubePlugin from '../Lexical/Plugins/YouTubePlugin';
|
||||
import AutoEmbedPlugin from '../Lexical/Plugins/AutoEmbedPlugin';
|
||||
import CollapsiblePlugin from '../Lexical/Plugins/CollapsiblePlugin';
|
||||
import DraggableBlockPlugin from '../Lexical/Plugins/DraggableBlockPlugin';
|
||||
import CodeHighlightPlugin from '../Lexical/Plugins/CodeHighlightPlugin';
|
||||
import FloatingTextFormatToolbarPlugin from '../Lexical/Plugins/FloatingTextFormatToolbarPlugin';
|
||||
import FloatingLinkEditorPlugin from '../Lexical/Plugins/FloatingLinkEditorPlugin';
|
||||
|
||||
const BlockDragEnabled = false;
|
||||
|
||||
@@ -88,12 +91,20 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
||||
<AutoFocusPlugin />
|
||||
<ClearEditorPlugin />
|
||||
<CheckListPlugin />
|
||||
<CodeHighlightPlugin />
|
||||
<LinkPlugin />
|
||||
<HashtagPlugin />
|
||||
|
||||
<AutoEmbedPlugin />
|
||||
<TwitterPlugin />
|
||||
<YouTubePlugin />
|
||||
<CollapsiblePlugin />
|
||||
{floatingAnchorElem && (
|
||||
<>
|
||||
<FloatingTextFormatToolbarPlugin anchorElem={floatingAnchorElem} />
|
||||
<FloatingLinkEditorPlugin />
|
||||
</>
|
||||
)}
|
||||
{floatingAnchorElem && BlockDragEnabled && (
|
||||
<>{<DraggableBlockPlugin anchorElem={floatingAnchorElem} />}</>
|
||||
)}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
const classNames = (...values: (string | boolean | undefined)[]): string => {
|
||||
return values
|
||||
.map((value) => (typeof value === 'string' ? value : null))
|
||||
.join(' ');
|
||||
};
|
||||
|
||||
export const PopoverClassNames = classNames(
|
||||
'typeahead-popover file-picker-menu absolute z-dropdown-menu flex w-full min-w-80',
|
||||
'cursor-auto flex-col overflow-y-auto rounded bg-default md:h-auto md:max-w-xs h-auto overflow-y-scroll',
|
||||
);
|
||||
|
||||
export const PopoverItemClassNames = classNames(
|
||||
'flex w-full items-center text-base gap-4 overflow-hidden py-2 px-3 hover:bg-contrast hover:text-foreground',
|
||||
'focus:bg-info-backdrop cursor-pointer m-0 focus:bg-contrast focus:text-foreground',
|
||||
);
|
||||
|
||||
export const PopoverItemSelectedClassNames = classNames(
|
||||
'bg-contrast text-foreground',
|
||||
);
|
||||
@@ -1,5 +0,0 @@
|
||||
import {createCommand, LexicalCommand} from 'lexical';
|
||||
|
||||
export const INSERT_FILE_COMMAND: LexicalCommand<string> = createCommand(
|
||||
'INSERT_FILE_COMMAND',
|
||||
);
|
||||
Reference in New Issue
Block a user