Sha256: 87d79673ecf39cee8ad38ef509b531164b34ff4fcdd33229405d099752d75402
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
<% content_for :javascripts do %> <script type="text/javascript"> var CKEDITOR_BASEPATH = '/assets/ckeditor/'; </script> <%= javascript_include_tag 'ckeditor/ckeditor' %> <%= javascript_include_tag 'ckeditor/adapters/jquery' %> <script type="text/javascript"> $(document).ready(function() { // var config = { toolbar: 'Basic', }; // var config = { toolbar: 'Full', }; var config = { toolbar: [['Source', '-', 'Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Undo', 'Redo', '-', 'Maximize']] }; $(".rich_text").ckeditor(config); }); </script> <% end %> <% custom = { :rows => @resource.typus_options_for(:form_rows), :class => "rich_text" } options = options.merge!(custom) %> <% unless options[:disabled] == true input = "#{@resource.model_name.underscore.gsub("/", "_")}_#{attribute}" insert_picture = <<-DATA <small> #{link_to "Insert picture", {:controller => "/admin/assets", :layout => 'admin/headless', :input => input}, {:class => "iframe", :style => "font-size: 10px; background: black; color: white; padding: 2px 5px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"}} </small> DATA label_text << insert_picture.html_safe end %> <li id="<%= attribute_id %>"> <%= form.label attribute, label_text.html_safe %> <%= form.text_area attribute, options %> </li>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typus-3.1.0.rc19 | app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb |