mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +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]
|
if options[:with_text_formatting]
|
||||||
# use either the provided id or fetch the one created by rails
|
# 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)
|
output << text_formatting_wrapper(id, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
|
|||||||
->(input, options) {
|
->(input, options) {
|
||||||
if options[:with_text_formatting]
|
if options[:with_text_formatting]
|
||||||
# use either the provided id or fetch the one created by rails
|
# 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)
|
options[:preview_context] ||= preview_context(object)
|
||||||
input.concat text_formatting_wrapper id, options
|
input.concat text_formatting_wrapper id, options
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user