mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Fix id parsing for wiki toolbar now that we use actual html
This commit is contained in:
@@ -83,7 +83,7 @@ module OpenProject
|
||||
|
||||
if options[:with_text_formatting]
|
||||
# use either the provided id or fetch the one created by rails
|
||||
id = options[:id] || output.match(/<[^>]* id="(\w+)"[^>]*>/)[1]
|
||||
id = options[:id] || output.match(/<textarea[^>]* id="(\w+)"[^>]*>/)[1]
|
||||
output << text_formatting_wrapper(id, options)
|
||||
end
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
|
||||
->(input, options) {
|
||||
if options[:with_text_formatting]
|
||||
# use either the provided id or fetch the one created by rails
|
||||
id = options[:id] || input.match(/<[^>]* id="(\w+)"[^>]*>/)[1]
|
||||
id = options[:id] || input.match(/<textarea[^>]* id="(\w+)"[^>]*>/)[1]
|
||||
options[:preview_context] ||= preview_context(object)
|
||||
input.concat text_formatting_wrapper id, options
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user