[go: up one dir, main page]

Menu

[r3]: / doc / app / editor.php  Maximize  Restore  History

Download this file

36 lines (26 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?
function loadEditor($textName,$textValue,$parentId) {
return loadFckEditor($textName,$textValue,$parentId);
}
function loadFckEditor($textName,$textValue,$parentId) {
include("fckeditor/fckeditor.php") ;
$siteUrl = SITE_URL;
if (!$toolbar) $toolbar = "docmgr";
$sBasePath = $siteUrl."fckeditor/";
$oFCKeditor = new FCKeditor($textName) ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Value = $textValue;
if (BROWSER=="ie") $oFCKeditor->Height = "500px"; //use fixed height for i.e.
else $oFCKeditor->Height = "87%";
$oFCKeditor->Config['EditorAreaCSS'] = $siteUrl."themes/default/css/site.css";
$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/silver/' ;
$oFCKeditor->ToolbarSet = $toolbar;
$oFCKeditor->Config['parentId'] = $parentId;
$oFCKeditor->Config['sessionId'] = session_id();
$oFCKeditor->Config['site_url'] = SITE_URL;
$oFCKeditor->Config['theme_path'] = THEME_PATH;
$oFCKeditor->Config['DefaultLanguage'] = LANG_I18N;
$oFCKeditor->Config['langFile'] = SITE_URL."lang/".LANG_I18N.".js";
$oFCKeditor->Config['objDir'] = OBJECT_DIR;
return $oFCKeditor->CreateHtml() ;
}