aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-04-30 14:36:04 +0200
committerache <ache@ache.one>2018-04-30 14:36:04 +0200
commit62a645d16202ef0b15e942fb410d6febc7bad20f (patch)
treea7eee17f01771a2916fd5d049a14b8f88e84a656
parentoups a console.log in the test file >_<" (diff)
Add information to install and useHEADmaster
-rw-r--r--README.md36
1 files changed, 35 insertions, 1 deletions
diff --git a/README.md b/README.md
index 882cbd4..e4c1d71 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,42 @@ Wich leads to :
## Installation
-Not ready at the moment.
+Easy as npm i :
+```shell
+npm install remark-text-input
+```
+
+
+## Installation
+
+An example of code :
+
+```js
+const unified = require('unified')
+const remarkParse = require('remark-parse')
+const stringify = require('rehype-stringify')
+const remark2rehype = require('remark-rehype')
+
+const textInput = require('remark-text-input')
+
+const testFile = `This is a text area :
+
+[_____
+A editable text here
+_____]`
+
+unified()
+ .use(remarkParse)
+ .use(textInput)
+ .use(remark2rehype)
+ .use(stringify)
+ .process( testFile, (err, file) => {
+ console.log(String(file));
+ } );
+```
+
+In the file, a text-area should be preceded by an empty line.
## Configuration