anchor.diff:      var ckedstoogle_ = {};
   
   
  +    function addEditorEvents(editor_) {
  +        editor_.on('lite:init', function (event) {
  +            ckedstoogle_[event.editor.name]['first'] = false;
  +            var lite = event.data.lite;
  +            ckedstoogle_[event.editor.name]['editor'] = lite;
  +            lite.toggleShow(ckedstoogle_[event.editor.name]['state']);
  +            lite.setUserInfo({id: 1, name: 'test'});
  +        });
  +        editor_.on('lite:showHide', function (event) {
  +            if (!ckedstoogle_[event.editor.name]['first']) {
  +                ckedstoogle_[event.editor.name]['state'] = event.data.show;
  +            }
  +        });
  +    }
  +
  +    function addEditor(id) {
  +        var editor_ = CKEDITOR.replace(id, {"toolbar": "proposal", "language": "it-IT", "customConfig": 'config_lite.js'});
  +        addEditorEvents(editor_);
  +    }
  +
  +
       $(function () {
  -
           for (name in CKEDITOR.instances) {
               ckedstoogle_[name] = {first: true};
               var editor = CKEDITOR.instances[name];
  -            editor.on('lite:init', function (event) {
  -                console.log('init');
  -                console.log(ckedstoogle_[event.editor.name]);
  -                ckedstoogle_[event.editor.name]['first'] = false;
  -                var lite = event.data.lite;
  -                lite.toggleShow(false);
  -                ckedstoogle_[event.editor.name]['state'] = false;
  -                lite.setUserInfo({id: 1, name: 'test'});
  -            });
  -            editor.on('lite:showHide', function (event) {
  -                if (!ckedstoogle_[event.editor.name]['first']) {
  -                    ckedstoogle_[event.editor.name]['state'] = event.data.show;
  -                    console.log(event.editor.name+':'+event.data.show);
  -                }
  -            });
  +            addEditorEvents(editor);
               //editor.addMenuGroup('lite', 3);
           }
       });
   
  -
  -    /*tinyMCE.init({
  -     mode: 'textareas',
  -     theme: 'advanced',
  -     height: 180,
  -     theme_advanced_toolbar_location: 'top',
  -     theme_advanced_toolbar_align: 'left',
  -     theme_advanced_buttons1: 'bold,italic,underline,separator,undo,redo,separator,bullist,numlist,separator,link,unlink,anchor,image,youtube,separator,ice_toggleshowchanges',
  -     theme_advanced_buttons2: '',
  -     theme_advanced_buttons3: '',
  -     plugins: 'legacyoutput,media,paste,inlinepopups,youtube,ice',
  -     formats: {
  -     underline: { inline: 'u' }
  -     },
  -     paste_auto_cleanup_on_paste: true,
  -     theme_advanced_statusbar_location: "none",
  -     //valid_elements: "-p",
  -     cleanup_on_startup: true,
  -     relative_urls: false,
  -     ice: {
  -     user: { name: '<%=current_user.fullname%>', id: <%=current_user.id%>},
  -     preserveOnPaste: 'p,a[href],i,em,strong'
  -     },
  -     body_class: "CT-hide"
  -     });*/
   
       function fillCleanFields() {
           var integrated_ = $('#proposal_integrated_contributes_ids_list').val();
  
positive.code:                 return false;
              }
          }
          $('textarea.tinymce').each(function () {
              var id = $(this).attr('id');
              $(this).next().next().val(tinymce.get(id).execCommand('icecleanbody'))
          });
  
          return true;
      }
  
negative.code:       <%= f.hidden_field :integrated_contributes_ids_list %>
  
        <%= f.submit t('buttons.update'), :class => 'btn blue', :onclick => 'return fillCleanFields();', disable_with: t('updating') %>
  
        <input onclick="fillCleanFields()">Test</input>
      </p>
  <% end %>
  
  