<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[TinyMCE Forum - IE: can't access editor instance functions]]></title>
		<link>http://www.tinymce.com/forum/viewtopic.php?id=165</link>
		<description><![CDATA[The most recent posts in IE: can't access editor instance functions.]]></description>
		<lastBuildDate>Tue, 25 Jan 2005 15:18:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=504#p504</link>
			<description><![CDATA[<p>I found that the problem only existed, in IE, when I tried to set the height and width.&nbsp; I deleted the Height and width and set the textarea to 100% and all was well.&nbsp; Except, now I get a JS error for the save button:)</p>]]></description>
			<author><![CDATA[dummy@example.com (halcyon00)]]></author>
			<pubDate>Tue, 25 Jan 2005 15:18:40 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=504#p504</guid>
		</item>
		<item>
			<title><![CDATA[Re: IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=481#p481</link>
			<description><![CDATA[<p>Yes, the problem here is that the editor gets initialized on page load. When the onload event triggers, so if you try to execute commands then the editor instance by that name won&#039;t exists just yet.</p><p>I suggest that you have a look at the setupcontent_callback option to solve this.</p><p>Here is a example how to use that in your code:</p><div class="codebox"><pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;!-- tinyMCE --&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;../jscripts/tiny_mce/tiny_mce.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
   tinyMCE.init({
      mode : &quot;textareas&quot;,
      setupcontent_callback : &quot;initialise&quot;
   });

   function initialise(editor_id, body_node) {
      tinyMCE.execCommand(&#039;mceFocus&#039;, false, editor_id);
   }
&lt;/script&gt;
&lt;!-- /tinyMCE --&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;textarea id=&quot;harr&quot; rows=&quot;25&quot; cols=&quot;80&quot;&gt;&lt;/textarea&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (spocke)]]></author>
			<pubDate>Sat, 22 Jan 2005 09:38:16 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=481#p481</guid>
		</item>
		<item>
			<title><![CDATA[Re: IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=480#p480</link>
			<description><![CDATA[<p>one thing i noticed just now is that while the alert box is being displayed, in IE the tinyMCE editor hasn&#039;t been loaded yet, all you see is the normal textarea. so naturally, the html elements which belong to tinymce aren&#039;t there yet. in firefox, though, the editor is already loaded up. so i guess the solution would be to change the call for &#039;initialise()&#039; to somwhere else. the problem is where. there might be some other way to fix this, i don&#039;t really know.</p>]]></description>
			<author><![CDATA[dummy@example.com (rhyek)]]></author>
			<pubDate>Fri, 21 Jan 2005 20:24:27 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=480#p480</guid>
		</item>
		<item>
			<title><![CDATA[Re: IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=479#p479</link>
			<description><![CDATA[<p>here&#039;s an example of what i&#039;m doing. i wonder where i&#039;m screwing up.<br /></p><div class="codebox"><pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;!-- tinyMCE --&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;tinymce/jscripts/tiny_mce/tiny_mce.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
    tinyMCE.init({
        mode : &quot;textareas&quot;
    });

    function initialise() {
        var t = document.getElementById(&quot;mce_editor_0&quot;);
        if (t) {
            alert(&#039;ok&#039;);
        } else {
            alert(&#039;doh!&#039;);
        }
        tinyMCE.execCommand(&#039;mceFocus&#039;, false, &#039;mce_editor_0&#039;);
    }
&lt;/script&gt;
&lt;!-- /tinyMCE --&gt;
&lt;/head&gt;

&lt;body onLoad=&quot;initialise()&quot;&gt;
&lt;textarea id=&quot;harr&quot; rows=&quot;25&quot; cols=&quot;80&quot;&gt;&lt;/textarea&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (rhyek)]]></author>
			<pubDate>Fri, 21 Jan 2005 19:13:06 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=479#p479</guid>
		</item>
		<item>
			<title><![CDATA[Re: IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=478#p478</link>
			<description><![CDATA[<p>did you try that in IE?</p>]]></description>
			<author><![CDATA[dummy@example.com (rhyek)]]></author>
			<pubDate>Fri, 21 Jan 2005 17:59:13 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=478#p478</guid>
		</item>
		<item>
			<title><![CDATA[Re: IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=476#p476</link>
			<description><![CDATA[<p>As a matter of fact, I was trying to do the exact same thing with execCommand using mceFocus and mceInsertContent and could not get it to work.&nbsp; I kept getting a pop-up warning for the mceInsertContent because mceFocus apparently didn&#039;t set the focus.&nbsp; After reading your post I tried execInstanceCommand and so far it seems to work perfectly.</p><p>Here is my line of PHP:<br />window.opener.tinyMCE.execInstanceCommand(&#039;mce_editor_0&#039;, &#039;mceInsertContent&#039;, false, &#039;&quot;.$record[&#039;Description&#039;].&quot;&#039;);</p><p>I&#039;m not sure what is wrong with your implementation, it seems like you are doing the same thing..</p><p>David</p>]]></description>
			<author><![CDATA[dummy@example.com (davidpesta)]]></author>
			<pubDate>Fri, 21 Jan 2005 17:36:47 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=476#p476</guid>
		</item>
		<item>
			<title><![CDATA[IE: can't access editor instance functions]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=469#p469</link>
			<description><![CDATA[<p>im trying to initialize an editor&#039;s content the moment the page is loaded. theres only one editor instance. <br />this is what i&#039;m using:<br /></p><div class="codebox"><pre><code>tinyMCE.execInstanceCommand(&#039;mce_editor_0&#039;, &#039;mceInsertContent&#039;, false, &#039;content&#039;);</code></pre></div><p>nothing happens in IE though (works fine in FF), and it seems the reason for it is the function can&#039;t find the &#039;mce_editor_0&#039; instance or something like that.<br />i understand i can&#039;t directly do a </p><div class="codebox"><pre><code>tinyMCE.setContent(&#039;content&#039;);</code></pre></div><p> because no instance has been selected on page-load, therefore &#039;setContent()&#039; wouldn&#039;t know where to put it. i figured using &#039;execInstanceCommand&#039; would be the best way.<br />Any help would be greatly appreciated.&nbsp; <img src="http://www.tinymce.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (rhyek)]]></author>
			<pubDate>Wed, 19 Jan 2005 22:19:26 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=469#p469</guid>
		</item>
	</channel>
</rss>
