Problem with tinymce :text_editor fields appearing intermittently

136 views
Skip to first unread message

Russell Fine

unread,
Jul 14, 2012, 2:00:06 PM7/14/12
to actives...@googlegroups.com
I need help with a strange "bug".  I have a model with a "description" column that is text, and I have set up tinmyce-rails to show the fields as a :text_editor field.  What's happening is that each time a partial is loaded the first time in the browser window, it has a tinymce editor.  But, if I show that partial again, it is no longer an editor.  For example, If I go to the page and press "Create" to create a record, the new form has a tinymce editor.  I close the form (with or without saving), press "Create" again, and the ui is no longer tinymce.  The same occurs if I edit any record... the first time the record comes up, it's the tinymce editor, subsequent times, no editor just a textarea.

What's interesting is that if I refresh the browser window, everything resets, and we are back to the 1st time for each again... each works the first time and fails subsequent times.  Thus, I'm thinking it has something to do with the partials being cached in some way where the tinymce javascript isn't re-processing them again.

I'm running this in Rails 3.2.6, Twitter bootstrap, Active Scaffold 3.2.14

Any ideas?  

Thanks,

Russell

Sergio Cambra

unread,
Jul 16, 2012, 2:42:40 AM7/16/12
to actives...@googlegroups.com
Tinymce have to be removed from textarea when textarea is removed from window
(closing or saving), or it won't work for the same ID. It should work if you
try to edit a record, because textarea ID will be different. Probably JS code
to remove tinymce is not being executed.

Divya Singhvi

unread,
Oct 1, 2012, 7:25:48 AM10/1/12
to actives...@googlegroups.com
I am having the same problem..Did u manage to find a solution??? If so,please share

Russell Fine

unread,
Oct 1, 2012, 10:25:28 AM10/1/12
to actives...@googlegroups.com
I didn't.  I had to just live with a text field for now.   The issue has something to do with letting tinymce know to reset each time... it's only done once during a page load.

R


--
You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activescaffold/-/aD4QOaSzcC8J.

To post to this group, send email to actives...@googlegroups.com.
To unsubscribe from this group, send email to activescaffol...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.

divzee Chandrashakher

unread,
Oct 10, 2012, 10:04:12 AM10/10/12
to actives...@googlegroups.com
The gem is fixed now :)
It works
https://github.com/spohlenz/tinymce-rails
Reply all
Reply to author
Forward
0 new messages