• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: TinyMCE and ajax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TinyMCE and ajax


  • Subject: Re: TinyMCE and ajax
  • From: Pascal Robert <email@hidden>
  • Date: Sun, 14 Mar 2010 12:56:05 -0400

      <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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: TinyMCE and ajax
      • From: Frank Stock <email@hidden>
References: 
 >TinyMCE and ajax (From: Frank Stock <email@hidden>)

  • Prev by Date: TinyMCE and ajax
  • Next by Date: Re: TinyMCE and ajax
  • Previous by thread: TinyMCE and ajax
  • Next by thread: Re: TinyMCE and ajax
  • Index(es):
    • Date
    • Thread