Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plugin started

  • Loading branch information...
commit 1ccfc3a081c8100dad2a93ad364eb90ef3961972 1 parent b35cc46
@dvberkel authored
Showing with 14 additions and 0 deletions.
  1. +4 −0 client/client.coffee
  2. +10 −0 client/client.js
View
4 client/client.coffee
@@ -194,6 +194,10 @@ $ ->
# PLUGINS for each story item type
window.plugins =
+ code:
+ emit: (div, item) -> div.append "<pre>#{item.text}</pre>"
+ bind: (div, item) ->
+ div.dblclick -> textEditor div, item
paragraph:
emit: (div, item) -> div.append "<p>#{resolveLinks(item.text)}</p>"
bind: (div, item) ->
View
10 client/client.js
@@ -250,6 +250,16 @@
}
};
window.plugins = {
+ code: {
+ emit: function(div, item) {
+ return div.append("<pre>" + item.text + "</pre>");
+ },
+ bind: function(div, item) {
+ return div.dblclick(function() {
+ return textEditor(div, item);
+ });
+ }
+ },
paragraph: {
emit: function(div, item) {
return div.append("<p>" + (resolveLinks(item.text)) + "</p>");
Please sign in to comment.
Something went wrong with that request. Please try again.