MirrorMark - Simple, yet extensible.
Built on the sheer power of the amazing
CodeMirror
# This is a main heading ## This is a sub heading ### This is a sub sub heading This is a normal Paragraph for bald headed people with no beards. **This text is bold** (Cmd-B) *Italicized* for you Italians (Cmd-I) ~~Strikethrough~~ for those who like it! > and this is a Blockquote (Cmd-') We have lists: (Cmd-Alt-L) 1. Here 2. Here 3. and Here We have bullets: (Cmd-L) * Pew * Pew * and Pew! Look how simple it is! ```javascript textarea1 = mirrorMark(document.getElementById("textarea1"), { autofocus: true }); textarea1.render(); ``` [We have links](http://cdn.meme.am/instances/500x/54432752.jpg) (Cmd-K) We even have images (Cmd-Alt-I) ![Markdown Everywhere](http://troll.me/images/toy-story-everywhere/markdown-markdown-everywhere.jpg)
Embedded Html
And notice those sneaky preview and fullscreen buttons?
Another Textarea
## This is another textarea proving that we can have multiple ones! Also notice those extra icons? Those were created like this: ```javascript var customActions = { "potatoes": function potatoes() { this.insert('![](https://33.media.tumblr.com/0de5ab0292ffc8dc7813e07978f89734/tumblr_n2patsaCTX1tvizo2o1_500.gif)'); }, "neverGoingToGiveYouUp": function neverGoingToGiveYouUp() { this.insert([ "## You know you love it!", '
', ]); } } var customKeyMaps = { // We magicically replace Cmd with Ctrl if you are normal and don't use a Mac "Shift-Cmd-Alt-1": "potatoes", "Shift-Cmd-Alt-1": "neverGoingToGiveYouUp", }; var customTools = [{ name: "more-actions", action: null, className: "fa fa-fighter-jet", // Hey look, dropdowns nested: [ { name: "Click me!", action: "potatoes",showName: true }, { name: "No, click me!", action: "neverGoingToGiveYouUp", showName: true } ] }]; ``` and added with this simple code: ```javascript textarea2 = mirrorMark(document.getElementById("textarea2")); textarea2.registerActions(customActions); textarea2.registerKeyMaps(customKeyMaps); textarea2.registerTools(customTools); textarea2.render(); ```
MirrorMark built by
Andrew Del Prete
at
Musicbed