<script language = "javascript" type = "text/javascript">
      tinyMCE.init({
        mode : "specific_textareas",
        editor_selector: "mceEditor",
        theme : "advanced",
        theme_advanced_buttons1 : 
"bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,link,unlink,code",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_path_location : "bottom",
        theme_advanced_resizing : true,
        valid_elements : 
"span[style],strong/b,em/i,strike,u,ul[style],li[style],a[name|href|target|title],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|name],hr[class|width|size|noshade],font[face|size|color|style],p[style]"
      });
      
      var saveOnSubmit = function() {
                        tinyMCE.activeEditor.save();
                        $('<wo:str 
value="$^id"/>').form.stopObserving('ajax:submit', arguments.callee);
                };
                $('<wo:str value="$^id"/>').form.observe('ajax:submit', 
saveOnSubmit);
                $('<wo:str value="$^id"/>').form.observe('submit', 
saveOnSubmit);
    </script>

On my AjaxSubmitButton component :

        onClick="tinyMCE.execCommand('mceRemoveControl', false, 
'longText');fancySave()"

And calling my TinyMCEJS component :

        <wo:TinyMCEJS id = "presentation" />

> Hi All,
> 
> I use tinyMCE in my page, but if I perform an Ajaxupdate, the tinyMCE has 
> disappeared. I have to a  new tinyMCE.init to solve that, but I also have to 
> add a timeout to make is appear again:
> 
> <wo:AjaxSubmitButton action = "$doAction" updateContainerID = "$updaterID" 
> button = "$false"  onSuccess ="function(e) {doOneUpdate() ;doTwoUpdate();}" 
> onComplete = "function(e) { setTimeout(\"setupEditor('infovak')\",500);}"> 
> 
> the 'setupEditor' is doing tinyMCE.init({....}), but why is it only working 
> with a timeout?
> How can I solve this?
> 
> Thanks in advance,
> Frank Stock
> Belgium
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to