tiny_mce plugin

Hi all,

I just installed the tiny_mce plugin and it works as advertised. But I can not get any plugin for tinymce to work. They are all there, they are installed, they load. But they do not appear.

I have MacBook Pro OS X 10.5.8, core2duo. Running XAMPP, and Ruby on Rails 2.3.3, ruby 1.8.6 and using the latest Passenger on Apache.

Here is my controller code :

  uses_tiny_mce :options => {                                 :theme => 'advanced',                                 :theme_advanced_resizing => true,                                 :plugins => %w{ table spellchecker emotions },                                 :theme_advanced_resize_horizontal => false,                                 :theme_advanced_toolbar_location => 'top'                               }

Trausti

And...

in your application.html.erb (layout) <head> <%= include_tiny_mce_if_needed %> </head>

in the view: <%= f.text_area "content", :class => 'mceEditor' %>

Do you know you don't even need the tinymce plugin to get TinyMCE to work out of the box?

Yes, this is exactly as I did it.

But as I do :plugins => %w{ table ... }

They do not appear. If I use plugins, do I change the :theme to something else ?

Trausti

:plugins => %w{ table ... } Does not mean "table" option will appear.

You need to specify some of those "plugins" in another "options", like ":theme_advanced_buttons2"   uses_tiny_mce :options => {                                 :theme => 'advanced',                                 :theme_advanced_resizing => true,                                 :plugins => %w{ table spellchecker emotions },                                 :theme_advanced_resize_horizontal => false,                                 :theme_advanced_buttons1 => %w {tablecontrols separator ts_image media fullscreen},                                 :theme_advanced_toolbar_location => 'top'                               }

etc...

here are more detailed usage: uses_tiny_mce(:options => {:theme => 'advanced',                              :theme_advanced_toolbar_location => "top",                              :theme_advanced_toolbar_align => "left",                              :theme_advanced_resizing => true,                              :paste_auto_cleanup_on_paste => true,                              :editor_selector => "text_body",                              :relative_urls => false,                              :fullscreen_new_window => true,                              :theme_advanced_statusbar_location => "bottom",                              :theme_advanced_buttons1 => %w{bullist numlist separator bold italic underline strikethrough separator forecolor backcolor},                              :theme_advanced_buttons2 => %w {tablecontrols separator ts_image media fullscreen},                              :theme_advanced_buttons3 => %w {justifyleft justifycenter justifyright justifyfull separator indent outdent separator ltr rtl separator link unlink anchor separator undo redo preview separator cut copy paste separator cleanup code},                              :plugins => %w{ts_advimage inlinepopups fullscreen table media directionality contextmenu paste advlink advhr}},                 :only => [:new, :edit, :update, :create])

Thanks Alexey,

This is what was needed.

Trausti

Hi All,

I get now mostly everything working, except for 2 things.

If I press the table button, and add 2 rows and 2 columns, press either insert or enter, and the window doesn't go away.

Is there anyway I could get a picture picker instead of the image window that comes up ?

The more pressing issue is the table one. If I go into html mode, create a table and then leave the table mode, I do get a fully working table. Hope someone can help me with this.

Trausti

Hi All,

I found this out. I had in the plugins set 'image' but it should have been 'advimage' and now everything works as it should.

Thanks

Trausti

git://github.com/sandipransing/rails_tiny_mce.git