summaryrefslogtreecommitdiffstats
path: root/lib/redmine/plugin.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-21 16:29:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-21 16:29:25 +0000
commit0a6f936626f4af6857bdbdd9a13a4b8afb513d01 (patch)
tree90f055fca1d3cfcf6b96dfe371dec7be24c14c6a /lib/redmine/plugin.rb
parentc2eb531f7e7de1a3190893b9f3408035af987389 (diff)
downloadredmine-0a6f936626f4af6857bdbdd9a13a4b8afb513d01.tar.gz
redmine-0a6f936626f4af6857bdbdd9a13a4b8afb513d01.zip
Updates #wiki_format_provider plugin API with changes to wiki formatting (#20141).
git-svn-id: http://svn.redmine.org/redmine/trunk@14363 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/plugin.rb')
-rw-r--r--lib/redmine/plugin.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb
index c84e89f0c..d41d8eda7 100644
--- a/lib/redmine/plugin.rb
+++ b/lib/redmine/plugin.rb
@@ -359,11 +359,18 @@ module Redmine #:nodoc:
# Registers a wiki formatter.
#
# Parameters:
- # * +name+ - human-readable name
+ # * +name+ - formatter name
# * +formatter+ - formatter class, which should have an instance method +to_html+
- # * +helper+ - helper module, which will be included by wiki pages
- def wiki_format_provider(name, formatter, helper)
- Redmine::WikiFormatting.register(name, formatter, helper)
+ # * +helper+ - helper module, which will be included by wiki pages (optional)
+ # * +html_parser+ class reponsible for converting HTML to wiki text (optional)
+ # * +options+ - a Hash of options (optional)
+ # * :label - label for the formatter displayed in application settings
+ #
+ # Examples:
+ # wiki_format_provider(:custom_formatter, CustomFormatter, :label => "My custom formatter")
+ #
+ def wiki_format_provider(name, *args)
+ Redmine::WikiFormatting.register(name, *args)
end
# Returns +true+ if the plugin can be configured.