#2566: multiple editor instances, FCKeditorAPI.GetInstance error
-----------------------------------------------------------------+----------
 Reporter:  artlover                                             |       Owner: 
                
     Type:  Bug                                                  |      Status: 
 new            
 Priority:  Normal                                               |   Milestone: 
                
Component:  General                                              |     Version: 
 FCKeditor 2.6.3
 Keywords:  multiple editor instances, FCKeditorAPI.GetInstance  |  
-----------------------------------------------------------------+----------
 '''Summary:'''
 when i set multiple editor instances, then get the instances use
 FCKeditorAPI.GetInstance, it will return undefined (sometime)

 vista + firefox 3.01

 '''Steps to replicate:'''
 1.open fckeditor/_samples/html/sample02.html [[BR]]

 2.edit the javascript to :

 {{{
         var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
         oFCKeditor.BasePath     = sBasePath ;
         oFCKeditor.ReplaceTextarea() ;

         var oFCKeditor2 = new FCKeditor( 'FCKeditor2' ) ;
         oFCKeditor2.BasePath    = sBasePath ;
         oFCKeditor2.ReplaceTextarea() ;
 }}}

 3.edit the form code to :

 {{{
         <form action="../php/sampleposteddata.php" method="post"
 target="_blank">
                 <div>
                         <textarea name="FCKeditor1" rows="5" cols="80"
 style="width: 100%; height: 200px">&lt;p&gt;This is some
 &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a
 href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;</textarea>

                         <textarea name="FCKeditor2" rows="10" cols="80"
 style="width: 100%; height: 300px">test</textarea>
                 </div>
                 <br />
                 <input type="submit" value="Submit" />
                 <br />
                 <input type="button" value="Get"
 onclick="alert('FCKeditor1' +'=>'+
 FCKeditorAPI.GetInstance('FCKeditor1'));alert('FCKeditor2' +'=>'+
 FCKeditorAPI.GetInstance('FCKeditor2'));" />
         </form>
 }}}

 4.run the sample in firefox 3.01 , click the "Get" button, sometime it
 will return undefined.[[BR]]

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2566>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to