Mailspring/docs/DraftStoreProxy.html
2015-10-03 12:39:26 -07:00

66 lines
1.9 KiB
HTML

---
layout: docs
title: DraftStoreProxy
edit_url: "https://github.com/nylas/N1/blob/master/src/flux/stores/draft-store-proxy.coffee"
---
<h2>Summary</h2>
<div class="markdown-from-sourecode">
<p><p>DraftStoreProxy is a small class that makes it easy to implement components
that display Draft objects or allow for interactive editing of Drafts.</p>
<ol>
<li>It synchronously provides an instance of a draft via <code>draft()</code>, and
triggers whenever that draft instance has changed.</li>
<li>It provides an interface for modifying the draft that transparently
batches changes, and ensures that the draft provided via <code>draft()</code>
always has pending changes applied.</li>
</ol>
</p>
</div>
<ul>
</ul>
<h3>Instance Methods</h3>
<h4 id=draft class="function-name">
draft(<span class="args"></span>) <a href="#draft" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p></p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
<th>Return Values</th>
</tr>
<tr><td class="markdown-from-sourecode"><p>Returns the draft object with the latest changes applied.</p>
</td></tr>
</table>
<h4 id=draftPristineBody class="function-name">
draftPristineBody(<span class="args"></span>) <a href="#draftPristineBody" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p></p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
<th>Return Values</th>
</tr>
<tr><td class="markdown-from-sourecode"><p>Returns the initial body of the draft when it was pristine, or null if the
draft was never pristine in this editing session. Useful for determining if the
body is still in an unchanged / empty state.</p>
</td></tr>
</table>