开发者

Rails Tiny Mce text_area params empty

As you can see here in my rails log my text_area text is empty:

Started POST "/admin/tags/3" for 127.0.0.1 at 2011-04-28 08:24:39 +0200
  Processing by Admin::TagsController#update as HTML
  Parameters: {"utf8"=>"Ô£ô", "authenticity_token"=>"X9LoKGw2OXE/rXBor7YxEKJmxpe
BM0hq+u7q1NiPbtE=", "tag"=>{"name"=>"vind billetter", "title"=>"Vind billetter Ô
Çô Deltag i konkurrencer om billetter", "keywords"=>"", "meta"=>"", "h1"=>"Vind
billetter ÔÇô Deltag i konkurrencer om billetter", "text"=>""}, "commit"=>"Updat
e Tag", "id"=>"3"}
  ←[1m←[36mKonkurrancer Load (0.0ms)←[0m  ←[1mSELECT `konkurrancers`.* FROM `kon
kurrancers`←[0m
  ←[1m←[35mCACHE (0.0ms)←[0m  SELECT `konkurrancers`.* FROM `konkurrancers`
  ←[1m←[36mCACHE (0.0ms)←[0m  ←[1mSELECT `konkurrancers`.* FROM `konkurrancers`←
[0m
  ←[1m←[35mTag Load (0.0ms)←[0m  SELECT `tags`.* FROM `tags`
  ←[1m←[36mAdmin Load (1.0ms)←[0m  ←[1mSELECT `admins`.* FROM `admins` WHERE (`a
dmins`.`id` = 1) LIMIT 1←[0m
  ←[1m←[35mTag Load (0.0ms)←[0m  SELECT `tags`.* FROM `tags` WHERE (`tags`.`cach
ed_slug` = '3') LIMIT 1
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mSELECT sluggable_id FROM slugs WHERE ((slugs.slu
ggable_type = 'Tag' AND slugs.name = '3' AND slugs.sequence = 1))←[0m
  ←[1m←[35mTag Load (0.0ms)←[0m  SELECT `tags`.* FROM `tags` WHERE (`tags`.`id`
= 3) LIMIT 1
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mBEGIN←[0m
  ←[1m←[35mSlug Load (1.0ms)←[0m  SELECT `slugs`.* FROM `slugs` WHERE (`slugs`.s
luggable_id = 3 AND `slugs`.sluggable_type = 'Tag') ORDER BY id DESC LIMIT 1
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mCOMMIT←[0m
Redirected to http://localhost:3000/admin/kategoris/3
Completed 302 Found in 207ms

My form:

    <%= simple_form_for(@kategori, :url => {:action => 'update', :id => @kategori.id }) do |f| %>
<%= f.text_area :text, :cols => 80, :rows => 20, :class => 'mceEditor' %>
    <%= f.button :submit %>
    <% end %>

My tiny_mce.yml :

开发者_StackOverflow# Here you can specify default options for TinyMCE across all controller
theme: advanced
editor_selector: tinyMce
plugins:
 - layer
 - save
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top"
        theme_advanced_toolbar_align : "left"
        theme_advanced_statusbar_location : "bottom"
        theme_advanced_resizing : true

My applikation controller:

uses_tiny_mce(:options => {  :theme => 'advanced', :theme_advanced_toolbar_location => "top", :theme_advanced_toolbar_align => "left", :editor_selector => "mceEditor", :skin => 'o2k7', :skin_variant => 'silver', :theme_advanced_resizing => true, :theme_advanced_statusbar_location => "bottom"})

My tags controller:

uses_tiny_mce :options => {  :theme => 'simple'}

The text_area text is not submitted in both the update and create action


This question/answer seems to apply to your problem too - have a look: TinyMCE not sending value

If this does not help - let me know.


I have found a solution I removed my tiny_mce configuration in my admin controller

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜