%p Vous pouvez modifier le contenu directement à l'endroit où vous avez placé votre texte.
%p N'oubliez pas de sauvegarder vos modifications avec le bouton ci dessous.

-if @text_content.id
  =semantic_form_for( [:portlet, @text_content], :remote => true, :html => {:"data-portlet-id" => @text_content.portlet.id}) do |f|
  
    
    =f.text_area :content, :style => "width:98%;height:600px;", :class => "redactor_content", :style => "display:none;"

  
  
  
    -if TextContent::STYLES.size > 0
      Style :
      = f.select :style, TextContent::STYLES


 
    :javascript
      $("#element_form form").submit(function (e){
      
        $("#element_form textarea").val($('#portlet_'+$("#element_form form").data("portlet-id")+' .content').redactor('code.get'));
        $("#toolbar-text").html("");
      
      });
      
      $('#portlet_'+$("#element_form form").data("portlet-id")+' .content').redactor({
        focus: true,
        lang: 'fr',
        toolbarExternal: '#toolbar-text',
        buttonSource: true,
        buttons : [ 'html','alignleft', 'aligncenter', 'alignright', 'justify', 'formatting', 'bold', 'italic', 'deleted','underline','unorderedlist', 'orderedlist', 'outdent', 'indent','image', 'file', 'link', 'alignment','fontsize', 'horizontalrule','fontcolor', 'backcolor', 'table'],
        plugins : ['table','bufferbuttons','fontsize',"fontfamily", 'fontcolor', 'scriptbuttons']
      
      
    
      });
  
    
  
  
-else
  =semantic_form_for( [:portlet, @text_content], :remote => true) do |f|
    =f.text_area :content, :style => "width:98%;height:600px;", :class => "redactor_content", :style => "display:none;"

  
  
  
    -if TextContent::STYLES.size > 0
      Style :
      = f.select :style, TextContent::STYLES


 
    :javascript
    
      $("#new_portlet_form_inline").html('<div class="content"></div>')
      
      content_element = $('#new_portlet_form_inline .content')
      
      $("#element_form form").submit(function (e){
      
        $("#element_form textarea").val(content_element.redactor('code.get'));
        $("#toolbar-text").html("");
      
      });
      
      content_element.redactor({
        focus: true,
        lang: 'fr',
        toolbarExternal: '#toolbar-text',
        buttonSource: true,
        buttons : [ 'html','alignleft', 'aligncenter', 'alignright', 'justify', 'formatting', 'bold', 'italic', 'deleted','underline','unorderedlist', 'orderedlist', 'outdent', 'indent','image', 'file', 'link', 'alignment','fontsize', 'horizontalrule','fontcolor', 'backcolor', 'table'],
        plugins : ['table','bufferbuttons','fontsize',"fontfamily", 'fontcolor', 'scriptbuttons']
      
      
    
      });
  
    

  
