REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.51 KB
Close
/home/byroehnu/.trash/node_modules11/@adminjs/design-system/node_modules/@tiptap/react/src/FloatingMenu.tsx
Text
Base64
import { FloatingMenuPlugin, FloatingMenuPluginProps } from '@tiptap/extension-floating-menu' import React, { useEffect, useState, } from 'react' import { useCurrentEditor } from './Context.js' type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K> export type FloatingMenuProps = Omit<Optional<FloatingMenuPluginProps, 'pluginKey' | 'editor'>, 'element'> & { className?: string, children: React.ReactNode } export const FloatingMenu = (props: FloatingMenuProps) => { const [element, setElement] = useState<HTMLDivElement | null>(null) const { editor: currentEditor } = useCurrentEditor() useEffect(() => { if (!element) { return } if (props.editor?.isDestroyed || currentEditor?.isDestroyed) { return } const { pluginKey = 'floatingMenu', editor, tippyOptions = {}, shouldShow = null, } = props const menuEditor = editor || currentEditor if (!menuEditor) { console.warn('FloatingMenu component is not rendered inside of an editor component or does not have editor prop.') return } const plugin = FloatingMenuPlugin({ pluginKey, editor: menuEditor, element, tippyOptions, shouldShow, }) menuEditor.registerPlugin(plugin) return () => menuEditor.unregisterPlugin(pluginKey) }, [ props.editor, currentEditor, element, ]) return ( <div ref={setElement} className={props.className} style={{ visibility: 'hidden' }}> {props.children} </div> ) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
BubbleMenu.tsx
1.51 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Context.tsx
1.12 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Editor.ts
489 B
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EditorContent.tsx
3.52 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FloatingMenu.tsx
1.51 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
379 B
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NodeViewContent.tsx
528 B
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NodeViewWrapper.tsx
561 B
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ReactNodeViewRenderer.tsx
5.92 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ReactRenderer.tsx
2.19 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useEditor.ts
2.96 KB
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useReactNodeView.ts
392 B
lrw-r--r--
2026-02-28 11:47:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).