<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`Workspace`](Workspace) › [on('quick-preview')](Workspace/on('quick-preview').md) ## Workspace.on('quick-preview') method Triggered when the active Markdown file is modified. React to file changes before they are saved to disk. 0.9.7 **Signature:** ```typescript on(name: 'quick-preview', callback: (file: TFile, data: string) => any, ctx?: any): EventRef; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>name</code> | <code>'quick-preview'</code> | | | <code>callback</code> | <code>(file: </code>[`TFile`](TFile)<code>, data: string) =&gt; any</code> | | | <code>ctx</code> | <code>any</code> | _(Optional)_ | **Returns:** [`EventRef`](EventRef)