I uses tiny mce in my rails application successfully, but when I try to use it in a form_for on a page that have been loaded by link_to_remote tiny mce does not work any more. How to solve this problem ? Any other html editor that may work in this situation. I tried fckeditor, but the problem was the same. How about the tiny mce plugin at git://github.com/kete/tiny_mce.gi? I am not using the plugin but tiny mce directly. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
If I remember correctly, tinyMCE is static and won''t work with dynamic changes of page content. In other words, your ajax result is unknown to tinyMCE. A work around might be that you need to load tinyMCE at the same time you get the result from ajax. I think I did this a long time before by putting the part of the loading mce part of js in a partial, and then put the partial as part of another partial that ajax renders. On Mar 8, 1:57 pm, Hans <Hans.Marmo...-6LjvI5LOC4niH4Lt12DN6A@public.gmane.org> wrote:> I uses tiny mce in my rails application successfully, but when I try > to use it in a form_for on a page that have been loaded by > link_to_remote tiny mce does not work any more. > How to solve this problem ? > Any other html editor that may work in this situation. I tried > fckeditor, but the problem was the same. > How about the tiny mce plugin at git://github.com/kete/tiny_mce.gi? > I am not using the plugin but tiny mce directly.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You''ll probably find that most editors have this issue. When you insert a textarea into the page via an AJAX call, you must readd that editor to the textareas. The easiest way is the have some Javascript like this: function init_wysiwyg_editor() { # the editor initialize code } then on any partial you render via AJAX, make sure it is set to eval_scripts, and add this at the end of the partial. <script type="text/javascript">init_wysiwyg_editor();</script> Regards Kieran On Mar 9, 7:57 am, Hans <Hans.Marmo...-6LjvI5LOC4niH4Lt12DN6A@public.gmane.org> wrote:> I uses tiny mce in my rails application successfully, but when I try > to use it in a form_for on a page that have been loaded by > link_to_remote tiny mce does not work any more. > How to solve this problem ? > Any other html editor that may work in this situation. I tried > fckeditor, but the problem was the same. > How about the tiny mce plugin at git://github.com/kete/tiny_mce.gi? > I am not using the plugin but tiny mce directly.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.