<BulkMarkdownEditor
control={control}
serialize={templateToMarkdown}
parse={markdownToTemplate}
applyToForm={(parsed) => reset(parsed, { keepDefaultValues: true })}
validate={validateTemplateMarkdown}
defaultMarkdown={templateToMarkdown(defaultValues ?? DEFAULT_FORM_VALUES)}
debounceMs={200}
completionSources={[auditTemplateCompletionSource]}
helpContent={<AuditTemplateMarkdownHelp />}
onValidityChange={setIsMarkdownInvalid}
>
<StructuredFormEditor />
</BulkMarkdownEditor>
Dual-mode form-section composite that toggles between a structured editor (rendered as
children) and a bulk markdown view of the same data.Owns the markdown text state, the touched/error display, and the two-way sync between the markdown text and the RHF form. The consumer provides
serialize,parse,applyToForm, andvalidateto bridge the two representations of the form.Internally renders
<MarkdownEditor>(with the Chakra-aligned theme and any consumer-suppliedcompletionSources) inside the markdown panel.