Support for an HTML builder that can create dynamic HTML

This commit is contained in:
Robin Ward
2017-04-17 15:47:21 -04:00
parent 3ccd5eacb4
commit 1363988cd7
5 changed files with 35 additions and 1 deletions

View File

@ -238,6 +238,10 @@ class Plugin::Instance
DiscoursePluginRegistry.custom_html.merge!(hash)
end
def register_html_builder(name, &block)
DiscoursePluginRegistry.register_html_builder(name, &block)
end
def register_asset(file, opts=nil)
full_path = File.dirname(path) << "/assets/" << file
assets << [full_path, opts]