REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.42 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/react/src/Context.tsx
Text
Base64
import { Editor } from '@tiptap/core' import React, { createContext, HTMLAttributes, ReactNode, useContext, } from 'react' import { EditorContent } from './EditorContent.js' import { useEditor, UseEditorOptions } from './useEditor.js' export type EditorContextValue = { editor: Editor | null; } export const EditorContext = createContext<EditorContextValue>({ editor: null, }) export const EditorConsumer = EditorContext.Consumer /** * A hook to get the current editor instance. */ export const useCurrentEditor = () => useContext(EditorContext) export type EditorProviderProps = { children?: ReactNode; slotBefore?: ReactNode; slotAfter?: ReactNode; editorContainerProps?: HTMLAttributes<HTMLDivElement>; } & UseEditorOptions /** * This is the provider component for the editor. * It allows the editor to be accessible across the entire component tree * with `useCurrentEditor`. */ export function EditorProvider({ children, slotAfter, slotBefore, editorContainerProps = {}, ...editorOptions }: EditorProviderProps) { const editor = useEditor(editorOptions) if (!editor) { return null } return ( <EditorContext.Provider value={{ editor }}> {slotBefore} <EditorConsumer> {({ editor: currentEditor }) => ( <EditorContent editor={currentEditor} {...editorContainerProps} /> )} </EditorConsumer> {children} {slotAfter} </EditorContext.Provider> ) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
BubbleMenu.tsx
1.56 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Context.tsx
1.42 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Editor.ts
510 B
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EditorContent.tsx
5.75 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FloatingMenu.tsx
1.56 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
443 B
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NodeViewContent.tsx
546 B
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NodeViewWrapper.tsx
579 B
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ReactNodeViewRenderer.tsx
10.57 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ReactRenderer.tsx
6.18 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types.ts
210 B
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useEditor.ts
12.35 KB
lrw-r--r--
2026-02-28 11:47:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useEditorState.ts
5.54 KB
lrw-r--r--
2026-02-28 11:47:14
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:14
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).