Skip to content

Commit 1a395df

Browse files
author
Alexis Beingessner
committed
Ticket OscarGodson#132 - documenting autogrow
1 parent cf25288 commit 1a395df

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ var opts = {
8181
togglePreview: 'Toggle Preview Mode',
8282
toggleEdit: 'Toggle Edit Mode',
8383
toggleFullscreen: 'Enter Fullscreen'
84-
}
84+
},
85+
autogrow: false
8586
}
8687
var editor = new EpicEditor(opts);
8788
```
@@ -208,6 +209,26 @@ var editor = new EpicEditor(opts);
208209
<td>The tooltip text that appears when hovering the fullscreen icon.</td>
209210
<td><code>Enter Fullscreen</code></td>
210211
</tr>
212+
<tr>
213+
<td><code>autogrow</code></td>
214+
<td>Whether to autogrow EpicEditor to fit its contents. If autogrow is desired one can either specify <code>true</code>, meaning to use default autogrow settings, or an object to define custom settings</td>
215+
<td><code>false</code></td>
216+
</tr>
217+
<tr>
218+
<td><code>autogrow.minHeight</code></td>
219+
<td>The minimum height (in pixels) that the editor should ever shrink to. This may also take a function that returns the desired minHeight if this is not a constant, or a falsey value if no minimum is desired</td>
220+
<td><code>80</code></td>
221+
</tr>
222+
<tr>
223+
<td><code>autogrow.maxHeight</code></td>
224+
<td>The maximum height (in pixels) that the editor should ever grow to. This may also take a function that returns the desired maxHeight if this is not a constant, or a falsey value if no maximum is desired</td>
225+
<td><code>false</code></td>
226+
</tr>
227+
<tr>
228+
<td><code>autogrow.scroll</code></td>
229+
<td>Whether the page should scroll to keep the caret in the same vertical place while autogrowing (recommended for mobile in particular)</td>
230+
<td><code>true</code></td>
231+
</tr>
211232
</table>
212233

213234
### load([_callback_])

0 commit comments

Comments
 (0)