Skip to content

Commit

Permalink
Update wysihtml5_input.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
delynn committed Dec 15, 2017
1 parent 1854910 commit 9e7ebd8
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1,7 +1,7 @@
class Wysihtml5Input < SimpleForm::Inputs::TextInput
def input(wrapper_options)
jquery = %Q($("textarea##{lookup_model_names.join("_")}_#{reflection_or_attribute_name}").wysihtml5(#{options[:wysihtml5].to_json});)
script = template.javascript_tag(%Q(if (typeof($) === "function") { #{jquery} } else { document.onreadystatechange = function() { if (document.readyState == "interactive") { #{jquery} } } }).html_safe
script = template.javascript_tag(%Q(if (typeof($) === "function") { #{jquery} } else { document.onreadystatechange = function() { if (document.readyState == "interactive") { #{jquery} } } })).html_safe

super + script
end
Expand Down

0 comments on commit 9e7ebd8

Please sign in to comment.