FEATURE: Convert HTML to Markdown while pasting in composer

This commit is contained in:
Vinoth Kannan
2017-12-05 22:53:39 +05:30
committed by Joffrey JAFFEUX
parent 067d454937
commit 6e054b2572
5 changed files with 75 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
require_dependency 'html_to_markdown'
class ComposerController < ApplicationController
before_action :ensure_logged_in
def parse_html
markdown_text = HtmlToMarkdown.new(params[:html]).to_markdown
render json: { markdown: markdown_text }
end
end