This commit is contained in:
2026-03-23 06:30:43 +01:00
parent a242869095
commit 6392457ffb
5 changed files with 129 additions and 147 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
import React, { ComponentProps } from "react";
import React, { ComponentProps, MutableRefObject } from "react";
import { RawEditorOptions, TinyMCE, Editor } from "./tinymce";
import { twMerge } from "tailwind-merge";
import twuiSlugToNormalText from "../../utils/slug-to-normal-text";
@@ -49,7 +49,8 @@ export default function TinyMCEEditor<KeyType extends string>({
const { tinyMCE } = useTinyMCE();
const editorComponentRef = React.useRef<HTMLDivElement>(null);
const editorRef = passedEditorRef || React.useRef<Editor>(null);
const editorRef: MutableRefObject<Editor | null> =
passedEditorRef || React.useRef(null);
const EDITOR_VALUE_CHANGE_TIMEOUT = 500;