mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:02:46 +08:00
41986cdb2f
This also corrects the positioning in the chain of the check and removes misuse of prepend_before_action
13 lines
246 B
Ruby
13 lines
246 B
Ruby
require_dependency 'html_to_markdown'
|
|
|
|
class ComposerController < ApplicationController
|
|
|
|
requires_login
|
|
|
|
def parse_html
|
|
markdown_text = HtmlToMarkdown.new(params[:html]).to_markdown
|
|
|
|
render json: { markdown: markdown_text }
|
|
end
|
|
end
|