Circle V2 API Docs
    Preparing search index...
    • 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, and validate to bridge the two representations of the form.

      Internally renders <MarkdownEditor> (with the Chakra-aligned theme and any consumer-supplied completionSources) inside the markdown panel.

      Type Parameters

      Parameters

      Returns Element

      <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>