Merge pull request #12 from PopulateTools/store-processed-html-from-markdown
Store DraftVersion processed html
This commit is contained in:
@@ -4,6 +4,7 @@ App.MarkdownEditor =
|
||||
textarea_content = element.find('textarea').val()
|
||||
result = md.render(textarea_content)
|
||||
element.find('#markdown-preview').html(result)
|
||||
element.find('#markdown-result input').val(result)
|
||||
|
||||
initialize: ->
|
||||
$('.markdown-editor').each ->
|
||||
|
||||
@@ -36,7 +36,8 @@ class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseCont
|
||||
:changelog,
|
||||
:status,
|
||||
:final_version,
|
||||
:body
|
||||
:body,
|
||||
:body_html
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
</div>
|
||||
<div id="markdown-preview" class="small-12 medium-6 column">
|
||||
</div>
|
||||
<div id="markdown-result">
|
||||
<%= f.hidden_field :body_html, label: false %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user