431 |
ddelon |
1 |
/*
|
|
|
2 |
* FCKeditor - The text editor for internet
|
|
|
3 |
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
|
|
|
4 |
*
|
|
|
5 |
* Licensed under the terms of the GNU Lesser General Public License:
|
|
|
6 |
* http://www.opensource.org/licenses/lgpl-license.php
|
|
|
7 |
*
|
|
|
8 |
* For further information visit:
|
|
|
9 |
* http://www.fckeditor.net/
|
|
|
10 |
*
|
|
|
11 |
* File Name: fckeditorapi.js
|
|
|
12 |
* Create the FCKeditorAPI object that is available as a global object in
|
|
|
13 |
* the page where the editor is placed in.
|
|
|
14 |
*
|
|
|
15 |
* File Authors:
|
|
|
16 |
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
|
17 |
*/
|
|
|
18 |
|
|
|
19 |
var FCKeditorAPI ;
|
|
|
20 |
|
|
|
21 |
function FCKeditorAPI_GetInstance( instanceName )
|
|
|
22 |
{
|
|
|
23 |
return this.__Instances[ instanceName ] ;
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
if ( !window.parent.FCKeditorAPI )
|
|
|
27 |
{
|
|
|
28 |
// Make the FCKeditorAPI object available in the parent window.
|
|
|
29 |
FCKeditorAPI = window.parent.FCKeditorAPI = new Object() ;
|
|
|
30 |
FCKeditorAPI.__Instances = new Object() ;
|
|
|
31 |
|
|
|
32 |
// Set the current version.
|
|
|
33 |
FCKeditorAPI.Version = '2.0' ;
|
|
|
34 |
|
|
|
35 |
// Function used to get a instance of an existing editor present in the
|
|
|
36 |
// page.
|
|
|
37 |
FCKeditorAPI.GetInstance = FCKeditorAPI_GetInstance ;
|
|
|
38 |
}
|
|
|
39 |
else
|
|
|
40 |
FCKeditorAPI = window.parent.FCKeditorAPI ;
|
|
|
41 |
|
|
|
42 |
// Add the current instance to the FCKeditorAPI's instances collection.
|
|
|
43 |
FCKeditorAPI.__Instances[ FCK.Name ] = FCK ;
|