Sha256: feb9c888a66510cc88c5e0abb04bb695c18c659c0d6fa9f6534d81ea9c65baaa

Contents?: true

Size: 1.2 KB

Versions: 6

Compression:

Stored size: 1.2 KB

Contents

<% if @textarea_component_include_tinymce_once.nil? %>
  <% content_for :script do %>
    <%= javascript_include_tag "tinymce/jquery.tinymce" %>
    <script type="text/javascript">
      function load_tinymce(){
        $("textarea[data-simple!=true]").tinymce({
          script_url: "/javascripts/tinymce/tiny_mce.js",
          theme: "advanced",
          skin: "cirkuit",
          mode: "textareas",
          theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,formatselect,|,link,unlink,image,code",
          theme_advanced_buttons2 : "",
          theme_advanced_buttons3 : "",
          theme_advanced_toolbar_location: "top",
          theme_advanced_toolbar_align: "left",
          // theme_advanced_statusbar_location : "bottom",
          theme_advanced_resizing: true
        });
      }
    </script>
  <% end %>
<% end %>

<%= text_area resource_name, field.name, :rows=>(field.rows || 20), :"data-simple"=>field.simple %>
<% if @textarea_component_include_tinymce_once.nil? %>
  <script type="text/javascript">
    $(document).ready(
     $(function(){
        load_tinymce();
      })
    )
  </script>
<% end %>
<% @textarea_component_include_tinymce_once = "done" %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lolita-3.1.5 app/views/components/lolita/configuration/field/string/text/_display.html.erb
lolita-3.1.4 app/views/components/lolita/configuration/field/string/text/_display.html.erb
lolita-3.1.3 app/views/components/lolita/configuration/field/string/text/_display.html.erb
lolita-3.1.2 app/views/components/lolita/configuration/field/string/text/_display.html.erb
lolita-3.1.1 app/views/components/lolita/configuration/field/string/text/_display.html.erb
lolita-3.1.0 app/views/components/lolita/configuration/field/string/text/_display.html.erb