@@ -182,6 +182,7 @@ const App = () => {
182182 const [ timelineModalOpen , setTimelineModalOpen ] = useState ( false ) ;
183183 const [ showHeaderModal , setShowHeaderModal ] = useState ( false ) ;
184184 const [ showFormattingModal , setShowFormattingModal ] = useState ( false ) ;
185+ const [ plainTextPreview , setPlainTextPreview ] = useState ( false ) ;
185186 const [ showMermaidModal , setShowMermaidModal ] = useState ( false ) ;
186187 const [ showUMLModal , setShowUMLModal ] = useState ( false ) ;
187188 const [ showSymbolsModal , setShowSymbolsModal ] = useState ( false ) ;
@@ -706,6 +707,11 @@ const App = () => {
706707 insertNewLineSyntax ( textareaRef , editorContent , setEditorContent ) ;
707708 } ;
708709
710+ // handleClearText toggles plain text preview mode (no markdown rendering)
711+ const handleClearText = ( ) => {
712+ setPlainTextPreview ( prev => ! prev ) ;
713+ } ;
714+
709715 // insertItalicSyntax function inserts an italic syntax for Markdown
710716 const handlerItalicSyntax = ( ) => {
711717 insertItalicSyntax ( textareaRef , editorContent , setEditorContent , cursorPositionRef ) ;
@@ -2684,6 +2690,7 @@ const App = () => {
26842690 onCodeLine = { handlerinsertCodeSyntax }
26852691 onCodeBlock = { handlerinsertBlockCodeSyntax }
26862692 onNewLine = { handleNewLineSyntax }
2693+ onClearText = { handleClearText }
26872694 onClose = { ( ) => setShowFormattingModal ( false ) }
26882695 />
26892696 )
@@ -3262,6 +3269,7 @@ const App = () => {
32623269 isPreviewFull = { isPreviewFull }
32633270 isHorizontal = { isHorizontal }
32643271 initializeMermaid = { initializeMermaid }
3272+ plainTextPreview = { plainTextPreview }
32653273 />
32663274 ) }
32673275 </ div >
0 commit comments