Add markdown preview; fix bug with deleted editor

This commit is contained in:
jomo
2014-05-11 06:43:56 +02:00
parent df030f4d2d
commit 19eb868a50
19 changed files with 135 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
<div class="md_editor <%= "mini" if mini %>">
<%= render partial: 'mdhelp' %>
<div class="field_container">
<div class="preview-button btn dark">Preview</div>
<% options = (defined?(options) && options || {}) %>
<% options[:class] = "#{options[:class]} editor_field" %>
<% options[:placeholder] ||= "Text" %>
<%= text_area_tag name, content, options %>
<div class="preview"><i>(Loading...)</i></div>
</div>
</div>