Mailspring/docs/DraftStoreProxy.html

67 lines
1.9 KiB
HTML
Raw Normal View History

2015-10-03 01:57:40 +08:00
---
layout: docs
title: DraftStoreProxy
2015-10-04 03:39:12 +08:00
edit_url: "https://github.com/nylas/N1/blob/master/src/flux/stores/draft-store-proxy.coffee"
2015-10-03 01:57:40 +08:00
---
2015-10-02 03:34:16 +08:00
2015-10-03 01:57:40 +08:00
<h2>Summary</h2>
2015-10-02 03:34:16 +08:00
2015-10-03 01:57:40 +08:00
<div class="markdown-from-sourecode">
<p><p>DraftStoreProxy is a small class that makes it easy to implement components
2015-10-02 03:34:16 +08:00
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>
2015-10-03 01:57:40 +08:00
<ul>
</ul>
<h3>Instance Methods</h3>
<h4 id=draft class="function-name">
draft(<span class="args"></span>) <a href="#draft" class="link"></a>
</h4>
2015-10-04 03:39:12 +08:00
2015-10-03 01:57:40 +08:00
<div class="function-description markdown-from-sourecode">
<p></p>
</div>
2015-10-04 03:39:12 +08:00
2015-10-03 01:57:40 +08:00
<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>
2015-10-04 03:39:12 +08:00
2015-10-03 01:57:40 +08:00
<div class="function-description markdown-from-sourecode">
<p></p>
</div>
2015-10-04 03:39:12 +08:00
2015-10-03 01:57:40 +08:00
<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>