2017-12-05 12:23:39 -05:00
|
|
|
require_dependency 'html_to_markdown'
|
|
|
|
|
|
|
|
class ComposerController < ApplicationController
|
|
|
|
|
2018-01-31 23:17:59 -05:00
|
|
|
requires_login
|
2017-12-05 12:23:39 -05:00
|
|
|
|
|
|
|
def parse_html
|
|
|
|
markdown_text = HtmlToMarkdown.new(params[:html]).to_markdown
|
|
|
|
|
|
|
|
render json: { markdown: markdown_text }
|
|
|
|
end
|
|
|
|
end
|