Finish MVP for content editing
This commit is contained in:
@@ -15,6 +15,10 @@ module ApplicationHelper
|
||||
tag.span text, class: "inline-flex items-center rounded-full bg-#{color}-100 px-2.5 py-0.5 text-xs font-medium text-#{color}-800"
|
||||
end
|
||||
|
||||
def markdown_to_html(string)
|
||||
raw Kramdown::Document.new(string, { input: "GFM" }).to_html
|
||||
end
|
||||
|
||||
def image_url_for(attachment)
|
||||
return s3_image_url(attachment) if Setting.s3_enabled?
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
module EditableContentHelper
|
||||
def editable_content_for(path, key, default: nil, create_rich: false)
|
||||
@content = EditableContent.find_by(path: "contributions/other", key: key)
|
||||
@content.content.present? ? @content.content : default
|
||||
end
|
||||
|
||||
def markdown_to_html(string)
|
||||
raw Kramdown::Document.new(string, { input: "GFM" }).to_html
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user