problem using tw.tinymce on an ajax loaded tab

36 views
Skip to first unread message

NiL

unread,
Feb 22, 2012, 3:21:10 AM2/22/12
to turbo...@googlegroups.com
Hi,

the title says it all. I have a create form with a tw.tinymce form and it works as expected.
My edit form, on the other hand, is ajax loaded, and I only get a standard textarea.
It puzzles me, as other js rich widgets (jqmultiselect, growing ...) works in this condition.
I have patched the widget so it uses a much more recent version tinymce, tried the jquery version .... to no success yet.

Has anyone encountered this problem ?

regards

NiL

Alessandro Molina

unread,
Feb 22, 2012, 3:51:20 AM2/22/12
to turbo...@googlegroups.com
About tw.tinymce I'm not sure, but many js based widgets require two
steps when loaded using ajax.

1) In the page that will load the ajax based partial it is required to
manually register the widgets script using widget.register_resources()

2) In that partial that will be loaded you might have to put a fake
<body> tag as many widgets try to inject scripts at the end of the
body to set them up.

At least this is the way I found to make all js based widgets work,
there might be a better way I'm not aware of.

> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/i8VIUq2k-qQJ.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> turbogears+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.

Reply all
Reply to author
Forward
0 new messages