Skip to content

Commit

Permalink
Making parentWindow optional
Browse files Browse the repository at this point in the history
  • Loading branch information
derwebcoder committed Oct 16, 2024
1 parent 96cdfb6 commit 4acc428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/components/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { isUserSelectingTag } from "./TagList/TagList";

export type TextInputProps = {
onSubmit?: (plainText: string, html: string) => void;
parentWindow: Window;
parentWindow?: Window;
};

let editor: Editor | null = null;

export const TextInput = (props: TextInputProps) => {
const { onSubmit, parentWindow } = props;
editor = useEditor({
extensions: getExtensions(parentWindow),
extensions: getExtensions(parentWindow ?? window),
editorProps: {
attributes: {
"aria-label": "Add a spark",
Expand Down

0 comments on commit 4acc428

Please sign in to comment.