Skip to content

OtiAnn/MyMarkdownEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MyMarkdownEditor

DEMO: http://annotis.github.io/MyMarkdownEditor/

Feature

  1. It's a Jquery widget
  2. Markdown syntax real-time hightlight
  3. No toolbar

##Usage

DOM settings

The element must be a textarea.

<textarea id="editor"></textarea>

Simple usage

$('#editor').editor()

Initialize with configs

Codemirror configs should nested pass in. All Codemirror configs are available. See also: Codemirror configuration

$('#editor').editor({
  autopreview: true,
  codeMirror:{
    // nested options
    lineNumbers: true
  }
})

Configuration

key type default
preview String or jquery object '#preview'
autoPreview boolean true

Methods

var editor = $('#editor').editor();

editor.editor('getInput') //call method

getInput

getOutput

Tech

  1. marked
  2. codemirror
  3. highlight.js

Releases

No releases published

Packages

No packages published