MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / handleModeChange

Function handleModeChange

packages/agentflow/src/atoms/ExpandTextDialog.tsx:71–79  ·  view source on GitHub ↗
(_: React.MouseEvent<HTMLElement>, newMode: EditorMode | null)

Source from the content-addressed store, hash-verified

69 }, [localValue, onConfirm])
70
71 const handleModeChange = (_: React.MouseEvent<HTMLElement>, newMode: EditorMode | null) => {
72 if (!newMode || newMode === mode) return
73 // When switching to Source, flush the editor's current state to markdown so the
74 // textarea shows markdown rather than a raw HTML string (Gap 3 fix — mirrors PR #6021).
75 if (newMode === 'source' && editorRef.current) {
76 setLocalValue(unescapeXmlTags(getEditorMarkdown(editorRef.current)))
77 }
78 setMode(newMode)
79 }
80
81 const isRichText = inputType === 'string'
82

Callers

nothing calls this directly

Calls 2

unescapeXmlTagsFunction · 0.90
getEditorMarkdownFunction · 0.90

Tested by

no test coverage detected