@@ -11,6 +11,7 @@ import { Toaster } from '@/components/ui/toaster';
1111import { EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME } from '@/constants' ;
1212import { RESET_CSS } from '@/constants/resetCSS' ;
1313import { editableEditorActions } from '@/store/editableEditor' ;
14+ import { ProviderRichText } from '@/store/ProviderRichText' ;
1415import { themeActions } from '@/theme/theme' ;
1516import type { BubbleMenuProps , ToolbarProps } from '@/types' ;
1617import { removeCSS , updateCSS } from '@/utils/dynamicCSS' ;
@@ -166,32 +167,33 @@ function RichTextEditor(props: RichTextEditorProps, ref: React.ForwardedRef<{ ed
166167
167168 return (
168169 < div className = "reactjs-tiptap-editor" >
169- < TooltipProvider delayDuration = { 0 }
170- disableHoverableContent
171- >
172- < div className = "richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1" >
173-
174- < div className = "richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col" >
175- { ! props ?. hideToolbar && < Toolbar disabled = { ! ! props ?. disabled }
176- editor = { editor }
177- toolbar = { props . toolbar }
178- /> }
179-
180- < EditorContent className = { `richtext-relative ${ props ?. contentClass || '' } ` }
181- editor = { editor }
182- />
183-
184- { hasExtensionValue && < CharactorCount editor = { editor }
185- extensions = { extensions }
186- /> }
187-
188- { ! props ?. hideBubble && < BubbleMenu bubbleMenu = { props ?. bubbleMenu }
189- disabled = { props ?. disabled }
190- editor = { editor }
191- /> }
170+ < ProviderRichText >
171+ < TooltipProvider delayDuration = { 0 }
172+ disableHoverableContent
173+ >
174+ < div className = "richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1" >
175+ < div className = "richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col" >
176+ { ! props ?. hideToolbar && < Toolbar disabled = { ! ! props ?. disabled }
177+ editor = { editor }
178+ toolbar = { props . toolbar }
179+ /> }
180+
181+ < EditorContent className = { `richtext-relative ${ props ?. contentClass || '' } ` }
182+ editor = { editor }
183+ />
184+
185+ { hasExtensionValue && < CharactorCount editor = { editor }
186+ extensions = { extensions }
187+ /> }
188+
189+ { ! props ?. hideBubble && < BubbleMenu bubbleMenu = { props ?. bubbleMenu }
190+ disabled = { props ?. disabled }
191+ editor = { editor }
192+ /> }
193+ </ div >
192194 </ div >
193- </ div >
194- </ TooltipProvider >
195+ </ TooltipProvider >
196+ </ ProviderRichText >
195197
196198 < Toaster />
197199 </ div >
0 commit comments