Last active
September 5, 2015 09:04
-
-
Save vlado/467854 to your computer and use it in GitHub Desktop.
Revisions
-
vlado renamed this gist
Sep 20, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vlado revised this gist
Jul 8, 2010 . 1 changed file with 3 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,22 +4,16 @@ module MarkItUpEditor def self.included(base) base.class_eval do @mark_it_up_dependencies_included = false end end protected def mark_it_up_input(method, options = {}) output = text_input(method, options) dom_id = "#{@object_name}_#{method}" output << mark_it_up(dom_id, options[:mark_it_up], @mark_it_up_dependencies_included) end end end -
vlado created this gist
Jul 8, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ module FormtasticExtensions module Formtastic module MarkItUpEditor def self.included(base) base.class_eval do @javascript_included = false end end protected def mark_it_up_input(method, options = {}) output = '' unless @javascript_included @javascript_included = true output << include_mark_it_up_javascripts output << include_mark_it_up_stylesheets end output << text_input(method, options) dom_id = "#{@object_name}_#{method}" output << mark_it_up(dom_id) end end end end if Object.const_defined?("Formtastic") Formtastic::SemanticFormBuilder.send(:include, FormtasticExtensions::Formtastic::MarkItUpEditor) end