From c45ada1c6b17ce6051a2ab245bf9789646f08adb Mon Sep 17 00:00:00 2001 From: Wes Cossick Date: Fri, 26 Jun 2015 13:52:19 -0500 Subject: [PATCH] Updates to README --- README.md | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cbac7d0..75da706 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A drop-in JavaScript textarea replacement for writing beautiful and understandab ## Quick start SimpleMDE is available on [jsDelivr](http://www.jsdelivr.com/#!simplemde). Font Awesome is available on MaxCDN. -``` +```HTML @@ -16,35 +16,43 @@ SimpleMDE is available on [jsDelivr](http://www.jsdelivr.com/#!simplemde). Font And then load SimpleMDE on the first textarea on a page -``` +```JavaScript + ``` #### Use a specific textarea Pure JavaScript method -``` +```JavaScript + ``` jQuery method -``` +```JavaScript + ``` ## Get the content -``` +```JavaScript simplemde.codemirror.getValue(); ``` ## Configuration +#### JS + - **element**: The DOM element for the textarea to use. Defaults to the first textarea on the page. - **status**: If set `false`, hide the status bar. Defaults to `true`. - **toolbar**: If set `false`, hide the toolbar. Defaults to `true`. @@ -54,7 +62,8 @@ simplemde.codemirror.getValue(); - **indentWithTabs**: If set `false`, indent using spaces instead of tabs. Defaults to `true`. - **tabSize**: If set, customize the tab size. Defaults to `'2'`. -``` +```JavaScript + +``` + +#### CSS + +To change the minimum height (before it starts auto-growing): + +```CSS + +``` + +Or, you can keep the height static: + +```CSS + ``` ## How it works @@ -85,3 +117,4 @@ As mentioned earlier, SimpleMDE is an improvement of [lepture's Editor project]( - Improved preview rendering in many ways - Improved as-you-type appearance of headers and code blocks - Simplified the toolbar +- Many new options during instantiation