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

Function loadContent

packages/agentflow/src/atoms/VariableInput.tsx:136–143  ·  view source on GitHub ↗
(ed: Editor, content: string, hasMentions: boolean)

Source from the content-addressed store, hash-verified

134})
135
136function loadContent(ed: Editor, content: string, hasMentions: boolean): void {
137 if (isHtmlContent(content)) {
138 ed.commands.setContent(content, { emitUpdate: false, contentType: 'html' })
139 } else {
140 ed.commands.setContent(escapeXmlTags(content), { emitUpdate: false, contentType: 'markdown' })
141 ed.commands.setContent(restoreTextMentions(ed.getJSON() as JsonNode, hasMentions)[0], { emitUpdate: false })
142 }
143}
144
145/**
146 * A TipTap-based text input with `{{ variable }}` mention support.

Callers 1

VariableInputFunction · 0.70

Calls 3

isHtmlContentFunction · 0.90
escapeXmlTagsFunction · 0.90
restoreTextMentionsFunction · 0.90

Tested by

no test coverage detected