Problem: Dynamically loaded text_fields with tinymce_hammer

瀏覽次數:5 次
跳到第一則未讀訊息

hadiS78

未讀,
2010年2月22日 上午10:13:242010/2/22
收件者:tinymce_hammer
Hi,

I have the following Problem:

I use javascript to load text_fields dynamically into a form. the
problem seems now that tinymce_hammer is not aware of loaded
text_fields during runtime and so the text fields stay empty, though
they appear as normal text fields. Is there any workaround or did i do
something wrong?
Thx in advance.

Trevor Rowe

未讀,
2010年2月22日 上午10:27:072010/2/22
收件者:tinymce...@googlegroups.com、hadiS78
TinyMCE doesn't monitor the page for text fields added after page load. When using the tinymce_hammer plugin, you should be able to call the following javascript after page load to add another editor:

TinymceHammer.addEditor('domid');

Be sure to replace 'domid' with the id of the text area you want converted to an editor. The text area must also be ready on the page before you call this method.

Hope this helps!

- Trevor Rowe

> --
> You received this message because you are subscribed to the Google Groups "tinymce_hammer" group.
> To post to this group, send email to tinymce...@googlegroups.com.
> To unsubscribe from this group, send email to tinymce_hamme...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tinymce_hammer?hl=en.
>

hadiS78

未讀,
2010年2月22日 中午12:03:592010/2/22
收件者:tinymce_hammer

Yeah it worked very well. Thanks a lot, u saved me a lot of time. I
additionally found this link for all who are interested
http://blog.mirthlab.com/2008/11/13/dynamically-adding-and-removing-tinymce-instances-to-a-page/
but the tinymcehammer way is much cleaner ;)

Maybe u can help me on my second problem too:

My (tinymce) text areas are inside an accordion (jQuery accordion to
be exactly). The div in which the text area is located is not hidden
at page load and every thing works fine. But whenever i hide the div
and show it again
the tinymce text area is still displaying but it dosen't react anymore
and everything added to the text area before was deleted (and i get
the following error when clicking on the buttons: "t.win.document is
null error").
Any ideas? I guess of showing again i have to call some function to
"reactivate" the text area?!?

回覆所有人
回覆作者
轉寄
0 則新訊息