Sha256: 959cfcc469ed03a49cda13cc6370e7e50bed98de6bc3781be790a5e012baa3f3

Contents?: true

Size: 374 Bytes

Versions: 3

Compression:

Stored size: 374 Bytes

Contents

module UEditor
  module Helpers
    module JsHelper
      def uejs(id)
        javascript_tag <<-END.gsub(/^ {8}/, "")
          function loadUEditor() {UE.getEditor('#{id}');}

          if (window.UE) {
            loadUEditor()
          } else {
            document.addEventListener('DOMContentLoaded', loadUEditor)
          }
        END

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ueditor.rails-0.0.5 lib/ueditor/helpers/js_helper.rb
ueditor.rails-0.0.4 lib/ueditor/helpers/js_helper.rb
ueditor.rails-0.0.3 lib/ueditor/helpers/js_helper.rb