<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Using TinyMCE with an AJAX form submit</title>
	<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/</link>
	<description>Nowadays it's all about portals; portals and ball bearings</description>
	<pubDate>Thu, 09 Sep 2010 04:19:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>

	<item>
		<title>by: yohann</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-18990</link>
		<pubDate>Tue, 03 Apr 2007 15:57:36 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-18990</guid>
					<description>Using ruby on rails with ajax request and submit...i can't edit a link..Do i have to do somthing special to access this functionality ? the other popup windows seem to work normally otherwise...</description>
		<content:encoded><![CDATA[<p>Using ruby on rails with ajax request and submit&#8230;i can&#8217;t edit a link..Do i have to do somthing special to access this functionality ? the other popup windows seem to work normally otherwise&#8230;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: H</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-15364</link>
		<pubDate>Fri, 09 Mar 2007 18:58:21 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-15364</guid>
					<description>Thanks Onno Schuit

that tinyMCE.idCounter=0; was a life saver :)</description>
		<content:encoded><![CDATA[<p>Thanks Onno Schuit</p>
<p>that tinyMCE.idCounter=0; was a life saver <img src='http://www.crossedconnections.org/w/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mr Jon</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-14296</link>
		<pubDate>Sun, 04 Mar 2007 01:59:19 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-14296</guid>
					<description>I'm trying to use ajax to auto-save the tinyMCE document.  It's running a triggerSave and ajax request every few seconds.

When using tinyMCE.triggerSave(true,true); the cursor is always reset to the very top.  

Does anyone know a way to keep the cursor in the same place through the call?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to use ajax to auto-save the tinyMCE document.  It&#8217;s running a triggerSave and ajax request every few seconds.</p>
<p>When using tinyMCE.triggerSave(true,true); the cursor is always reset to the very top.  </p>
<p>Does anyone know a way to keep the cursor in the same place through the call?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Maurice Fonk</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-11781</link>
		<pubDate>Sun, 28 Jan 2007 22:54:25 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-11781</guid>
					<description>You may want to have a look at a handy hash function in prototype which takes care of the asking-for-typos 'body=' + mceContent + '&#38;other=' + otherContent;'-bit and the serialization / url-encoding issue mentioned earlier in the comments. You can basically put your variables in a hash and call toQueryString on that hash. You do NEED some kind of encoding, as the raw output of tinyMCE can contain HTML-entities which start with an ampersand (&#38;), which would break the string given to pars in the Request.

More info at http://www.prototypejs.org/api/hash/toQueryString</description>
		<content:encoded><![CDATA[<p>You may want to have a look at a handy hash function in prototype which takes care of the asking-for-typos &#8216;body=&#8217; + mceContent + &#8216;&amp;other=&#8217; + otherContent;&#8217;-bit and the serialization / url-encoding issue mentioned earlier in the comments. You can basically put your variables in a hash and call toQueryString on that hash. You do NEED some kind of encoding, as the raw output of tinyMCE can contain HTML-entities which start with an ampersand (&amp;), which would break the string given to pars in the Request.</p>
<p>More info at <a href='http://www.prototypejs.org/api/hash/toQueryString' rel='nofollow'>http://www.prototypejs.org/api/hash/toQueryString</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Benjamin</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-10739</link>
		<pubDate>Wed, 10 Jan 2007 10:06:58 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-10739</guid>
					<description>I implemented kuba's trick to do an ajax save. My only difference was that I called the parameter save_ajax in stead of just ajax. Since this is so easy, maybe this can be implemented in the new builds. Saves us changing the tinyMCE code for every new release. There are just two minor adjustments, but I'm lazy :-)</description>
		<content:encoded><![CDATA[<p>I implemented kuba&#8217;s trick to do an ajax save. My only difference was that I called the parameter save_ajax in stead of just ajax. Since this is so easy, maybe this can be implemented in the new builds. Saves us changing the tinyMCE code for every new release. There are just two minor adjustments, but I&#8217;m lazy <img src='http://www.crossedconnections.org/w/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Follower</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-10607</link>
		<pubDate>Mon, 08 Jan 2007 04:34:00 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-10607</guid>
					<description>Thank you so much for your knowledge!
You just saved me a hour's worth of work!</description>
		<content:encoded><![CDATA[<p>Thank you so much for your knowledge!<br />
You just saved me a hour&#8217;s worth of work!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: toannh</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9285</link>
		<pubDate>Wed, 20 Dec 2006 09:05:06 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9285</guid>
					<description>please more detail ?</description>
		<content:encoded><![CDATA[<p>please more detail ?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: kuba</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9235</link>
		<pubDate>Tue, 19 Dec 2006 18:03:26 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9235</guid>
					<description>Sorry for previous post it eats html tags:
 
I’ve use TinyMCE without form or textarea, with little modification

I’ve add in tiny_mce.js in init function (ajax parameter):

this._def(”ajax”, false);

and in save plugin in editor_plugin.js

if(formObj&#124;&#124;inst.getParam(’ajax’)) {
…..


This is html file

[script]
function ajax_post(tinyInstance) {
sendAjaxRequest(tinyInstance.getBody().innerHTML());
}

tinyMCE.init({
mode:”exact”,
elements: “editor”,
ajax: true,
plugins: “save”,
theme: “advanced”,
save_onsavecallback: “ajax_post”,
theme_advanced_buttons1_add_before: “save,separator”,
…
});
[/script]
...
[body]
[div id="editor"][/div]
[/body]

With this you can use save plugin for sending ajax request.</description>
		<content:encoded><![CDATA[<p>Sorry for previous post it eats html tags:</p>
<p>I’ve use TinyMCE without form or textarea, with little modification</p>
<p>I’ve add in tiny_mce.js in init function (ajax parameter):</p>
<p>this._def(”ajax”, false);</p>
<p>and in save plugin in editor_plugin.js</p>
<p>if(formObj||inst.getParam(’ajax’)) {<br />
…..</p>
<p>This is html file</p>
<p>[script]<br />
function ajax_post(tinyInstance) {<br />
sendAjaxRequest(tinyInstance.getBody().innerHTML());<br />
}</p>
<p>tinyMCE.init({<br />
mode:”exact”,<br />
elements: “editor”,<br />
ajax: true,<br />
plugins: “save”,<br />
theme: “advanced”,<br />
save_onsavecallback: “ajax_post”,<br />
theme_advanced_buttons1_add_before: “save,separator”,<br />
…<br />
});<br />
[/script]<br />
&#8230;<br />
[body]<br />
[div id=&#8221;editor&#8221;][/div]<br />
[/body]</p>
<p>With this you can use save plugin for sending ajax request.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: kuba</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9234</link>
		<pubDate>Tue, 19 Dec 2006 17:57:04 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9234</guid>
					<description>I've use TinyMCE without form or textarea, with little modification

I've add in tiny_mce.js  in init function (ajax parameter):

   this._def("ajax", false);
  
and in save plugin in editor_plugin.js 

if(formObj&#124;&#124;inst.getParam('ajax')) {
.....


[  ]

function ajax_post(tinyInstance) {
  sendAjaxRequest(tinyInstance.getBody().innerHTML());
}

tinyMCE.init({
  mode:"exact",
  elements: "editor",
  ajax: true,
  plugins: "save",
  theme: "advanced",
  save_onsavecallback: "ajax_post",
  theme_advanced_buttons1_add_before: "save,separator",
...
});


[  ]



With this you can use save plugin for sending ajax request.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve use TinyMCE without form or textarea, with little modification</p>
<p>I&#8217;ve add in tiny_mce.js  in init function (ajax parameter):</p>
<p>   this._def(&#8221;ajax&#8221;, false);</p>
<p>and in save plugin in editor_plugin.js </p>
<p>if(formObj||inst.getParam(&#8217;ajax&#8217;)) {<br />
&#8230;..</p>
<p>[  ]</p>
<p>function ajax_post(tinyInstance) {<br />
  sendAjaxRequest(tinyInstance.getBody().innerHTML());<br />
}</p>
<p>tinyMCE.init({<br />
  mode:&#8221;exact&#8221;,<br />
  elements: &#8220;editor&#8221;,<br />
  ajax: true,<br />
  plugins: &#8220;save&#8221;,<br />
  theme: &#8220;advanced&#8221;,<br />
  save_onsavecallback: &#8220;ajax_post&#8221;,<br />
  theme_advanced_buttons1_add_before: &#8220;save,separator&#8221;,<br />
&#8230;<br />
});</p>
<p>[  ]</p>
<p>With this you can use save plugin for sending ajax request.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: toannh</title>
		<link>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9187</link>
		<pubDate>Tue, 19 Dec 2006 04:39:11 +0000</pubDate>
		<guid>http://www.crossedconnections.org/w/index.php/2006/03/18/using-tinymce-with-an-ajax-form-submit/#comment-9187</guid>
					<description>I used XmlHttpRequest for change content of div.</description>
		<content:encoded><![CDATA[<p>I used XmlHttpRequest for change content of div.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
