项目作者: Q42

项目描述 :
A simple markdown textarea with preview using perak:markdown
高级语言: JavaScript
项目地址: git://github.com/Q42/meteor-autoform-markdown.git
创建时间: 2015-04-22T19:04:27Z
项目社区:https://github.com/Q42/meteor-autoform-markdown

开源协议:

下载


autoform-markdown

A simple markdown textarea with preview using perak:markdown

Demo

Checkout http://autoform-markdown.meteor.com/

Usage

Add a custom template in your Schema

  1. Schemas.Quest = new SimpleSchema({
  2. title: {
  3. type: String
  4. },
  5. text: {
  6. type: String,
  7. autoform: {
  8. type: 'markdown'
  9. }
  10. }
  11. });

Render markdown text using the renderMarkdown helper in your template

  1. <template name="quest">
  2. <h1>{{title}}</h1>
  3. {{{renderMarkdown text}}}
  4. </template>

For more info and usage see: https://github.com/chjj/marked#usage