remark-text-input
A remark plugin that parse a syntax for textarea
Last updated 2 years ago by ache .
MIT · Original npm · Tarball · package.json
$ cnpm install remark-text-input 
SYNC missed versions from official npm registry.

remark-text-input

A remark plugin that parse Mardown syntax to add support for text area.

Syntax

You can add a text area this way :

[______
Some text.
_____]

Wich leads to :

Screenshot

Installation

Easy as npm i :

npm install remark-text-input

Installation

An example of code :

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

This plugin support custom HTML attributes :

[____
Here
some
text
_____]{.row=5 .cols=10}

Licence

MIT

Current Tags

  • 0.7.1                                ...           latest (2 years ago)

3 Versions

  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |