OT: TinyMCE in Rails

I'm having a problem getting the text area the size I want it to be.

In my view at the top I have this init calls <script type="text/javascript" >   tinyMCE.init({     mode: "textareas",     theme: 'advanced',     theme_advanced_toolbar_location: 'top'   }); </script>

Then in my form:

<%= text_area 'position', 'full_description' , :cols => "50", :rows => "15" %>

I've had the cols set to 200 and the rows to 600 and it hasn't changed. Anyone know how to get this working right or perhaps any issues ? I've tested it both in IE 7 and FF 1.5.x Same behaviour in both.

TIA Stuart

Hi Stuart,

Dark Ambient wrote:

I'm having a problem getting the text area the size I want it to be. <snip non-relevant js>

Then in my form:

<%= text_area 'position', 'full_description' , :cols => "50", :rows => "15" %>

Get rid of the quotes around the values. The api documentation for text_area gives the following example (with substitutions to use your object/method/values):

text_area("position", "full_description", "cols" => 50, "rows" => 15)Your substitution of symbols for strings won't give you a problem, but putting quotes on the values will.

hth, Bill

Bummer, it didn't help! :(. It sounded hopeful. I even changed the rows cols back to symbols but alas no difference. I'm having a tough time with these editors. Had dumped fck the other day for this.

Stuart

I thought I'd try removing tinymce and seeing what I get just defining a regular text_area. Well it's not sizing the rows and cols correctly with just a plain old rails text_area. Very puzzling as I've tried various combinations:

<%= text_area 'position', 'full_description', :cols => 300, :rows => 900 %>

Anyone ?

Stuart

Have you tried using smaller numbers? I’m wondering if the large number of rows and columns is causing the browser to ignore the numbers.

Also, when you ‘view source’ from within the browser, what does the html look like?

Larry , I just updated this thread so in answer to your first question, the new thread explains is that this only happens in one of my apps. In another I could correctly size from 20x20 to 200 x 400 (rows and cols) The html is fine, for example:

<textarea cols="40" id="position_full_description" name="position[full_description]" rows="20"></textarea>

Stuart

<...>

The html is fine, for example:

<textarea cols="40" id="position_full_description" name="position[full_description]" rows="20"></textarea>

If HTML if fine, maybe you have problem in your CSS? How does it work with CSS off?

Regards, Rimantas

Rimantas, Thanks , yes I think I messed up changing the topic on this thread. However, yes it was in the CSS.

Stuart