Skip to main content
Content Rewrite lets clinicians rewrite selected text in the hosted Dictation iframe before they submit. It is available in the Dictation SDK (@suki-sdk/dictation and @suki-sdk/dictation-react) and in Web SDK Dictation, which uses DictationClient from @suki-sdk/js and @suki-sdk/react. It works in both In-field mode and Scratchpad mode. Content Rewrite runs entirely in the hosted iframe. You do not send a rewrite API call, handle selection offsets, or apply the rewritten span. When a clinician selects text with the microphone off, the iframe shows the rewrite tooltip, sends the request, and applies the result. Your existing onSubmit and onDraft callbacks receive the updated field text.
No additional package, ShowOptions field, or callback is required.
Use @suki-sdk/dictation or @suki-sdk/dictation-react v0.1.0-beta.3 or later. For Web SDK Dictation, use the matching release from the same release train. If Dictation is already integrated, you do not install another package.
Content Rewrite requires backend enablement for your organization. You do not configure it in the SDK. If it is not enabled, the rewrite request fails and the UI shows an error. Confirm with Suki that it is enabled before you test with clinicians.

Common use cases

Shorten Long Dictation

After dictating into a note or form field, the clinician selects a long span, chooses Concise, and keeps documenting in the same session.

Expand Short Notes

The clinician selects brief wording, chooses Verbose, and replaces that span in the Dictation editor without starting another session.

Write for Patients

The clinician selects clinical wording, chooses Patient Friendly, and reviews the rewritten span in the hosted UI before they submit.

Rewrite in a Target Field

Use in-field mode so the clinician dictates into a chart field, then rewrites part of that field with the microphone off.

Rewrite in a Scratchpad

Use scratchpad mode so the clinician drafts in the floating panel, rewrites selected text there, then submits the full scratchpad text to your app.

Same Experience in Web SDK Dictation

Web SDK Dictation uses the same hosted iframe, so clinicians get the same rewrite tooltip and styles when Dictation is already in your Web SDK app.

How clinicians use Content Rewrite

The rewrite happens in the Dictation iframe. Your app still receives the full field text through the callbacks you already register.
1

Open Dictation

The clinician opens Dictation in in-field or scratchpad mode the same way they do today.
2

Turn Off the Microphone and Select Text

The clinician turns the microphone off, then selects the text they want to change. While the microphone is streaming, the rewrite tooltip stays hidden. The tooltip appears only when the selection has at least two words.
3

Choose a Rewrite Style

From the rewrite tooltip, the clinician chooses Concise, Verbose, or Patient Friendly. The hosted iframe sends the rewrite request. The UI shows Rewriting…. The clinician can select Cancel while the rewrite runs. Your app does not handle that HTTP call.
4

Replace the Selection or Retry

On success, Suki replaces only the selected span. The rest of the field stays as it is. If the rewrite fails, the UI shows Rewrite failed. Please try again. with Try again and Cancel. The SDK does not retry on its own.
5

Submit the Field

When the clinician submits, onSubmit receives { fieldId, text } for the full field value, including any rewritten spans. Optional onDraft works the same way for unfinished text.

ShowOptions and callbacks

Content Rewrite does not change the ShowOptions contract. Pass the same options you pass for any Dictation session.
Keep the onSubmit, onDraft, and onCancel callbacks you already register. Content Rewrite does not add a flag on show() or a rewrite-specific handler. The updated field text still arrives through those same callbacks.
Content Rewrite also does not support custom rewrite instructions from your app, and it does not run while the microphone is streaming.

Code examples

The following JavaScript and React code examples use the same Dictation setup you already have. When a clinician rewrites text in the iframe, onSubmit and onDraft receive the updated field text.
Pass your usual options to DictationClient.show(). Web SDK Dictation uses the same call with DictationClient from @suki-sdk/js.
JavaScript

Scratchpad mode

Content Rewrite works the same way in scratchpad mode. The clinician turns off the microphone, selects text, and rewrites it in the hosted UI. The final text still arrives on onSubmit.
JavaScript

Best practices

  • Confirm with Suki that Content Rewrite is enabled for your partner before you test with clinicians. The tooltip can still appear; the rewrite call fails if enablement is off.
  • Keep your existing onSubmit, onDraft, and onCancel handlers. Do not add enableRewrite, onRewrite, or custom rewrite instructions. Content Rewrite does not add ShowOptions fields.
  • Treat the text on onSubmit and onDraft as the full field, including any rewritten spans. The iframe applies the selection. Your app does not patch offsets.
  • Rewrite requires the microphone off and a selection of at least two words. While the microphone is streaming, the tooltip stays hidden.
  • If rewrite fails, the clinician retries from the hosted UI. The SDK does not retry on its own.
  • If you ship both modes, verify Content Rewrite in in-field and scratchpad. The clinician flow is the same in both.

Next steps

Callbacks - onSubmit, onCancel, and onDraft payload shape. Configuration - Every ShowOptions field. In-field mode - Attach Dictation to a single field. Scratchpad mode - Run Dictation in a floating panel.
Last modified on October 16, 2026