i want to use FCKEditor from within a DIV that i create dinamically with PHP. How can i do that ?
The code below illustrates what i try to realize e.g. a dynamically created layer depending on database field type:
function layer($aFields,$sLang,$id,$paramWindow,$bElmt,$sCSS) {
...Layer Header...
...Database browsing...
switch ($aFields[3][$i]) {
case "TEXT":
case "MEDIUMTEXT":
case "LONGTEXT":
$oFCKeditor = new FCKeditor ;
$oFCKeditor->ToolbarSet = 'VoltiCourt' ;
$oFCKeditor->Value = 'This is another test. <BR><B>The "Second" row.</B>' ;
$oFCKeditor->CanUpload = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CanBrowse = false ; // Overrides fck_config.js default configuration
$oFCKeditor->Styles = $sCSS ; // Overrides fck_config.js default configuration
$oFCKeditor->EditorAreaCSS = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],"/"))."/".'../commun/templates.css' ;
$layerCode.=$oFCKeditor->CreateFCKeditor( $aFields[0][$i].strtoupper($sLang), '80%', 120 ) ;
break;
}
The IFRAME code should go within the DIV tag but the only thing i succeed is to create FCK iframes at the beginning of my page!!!
Anyone?
The code below illustrates what i try to realize e.g. a dynamically created layer depending on database field type:
function layer($aFields,$sLang,$id,$paramWindow,$bElmt,$sCSS) {
...Layer Header...
...Database browsing...
switch ($aFields[3][$i]) {
case "TEXT":
case "MEDIUMTEXT":
case "LONGTEXT":
$oFCKeditor = new FCKeditor ;
$oFCKeditor->ToolbarSet = 'VoltiCourt' ;
$oFCKeditor->Value = 'This is another test. <BR><B>The "Second" row.</B>' ;
$oFCKeditor->CanUpload = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CanBrowse = false ; // Overrides fck_config.js default configuration
$oFCKeditor->Styles = $sCSS ; // Overrides fck_config.js default configuration
$oFCKeditor->EditorAreaCSS = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],"/"))."/".'../commun/templates.css' ;
$layerCode.=$oFCKeditor->CreateFCKeditor( $aFields[0][$i].strtoupper($sLang), '80%', 120 ) ;
break;
}
The IFRAME code should go within the DIV tag but the only thing i succeed is to create FCK iframes at the beginning of my page!!!
Anyone?
RE: FCK within a DIV
function layer($aFields,$sLang,$id,$paramWindow,$bElmt,$sCSS) {
...Layer Header...
...Database browsing...
switch ($aFields[3][$i]) {
case "TEXT":
case "MEDIUMTEXT":
case "LONGTEXT":
ob_start();
$oFCKeditor = new FCKeditor ;
$oFCKeditor->ToolbarSet = 'VoltiCourt' ;
$oFCKeditor->Value = 'This is another test. <BR><B>The "Second" row.</B>' ;
$oFCKeditor->CanUpload = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CanBrowse = false ; // Overrides fck_config.js default configuration
$oFCKeditor->Styles = $sCSS ; // Overrides fck_config.js default configuration
$oFCKeditor->EditorAreaCSS = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],"/"))."/".'../commun/templates.css' ;
$layerCode.=$oFCKeditor->CreateFCKeditor( $aFields[0][$i].strtoupper($sLang), '80%', 120 ) ;
$ret=ob_get_contents();
ob_end_clean();
return $ret; // returns HTML code of FCKEditor
break;
}
RE: FCK within a DIV
RE: FCK within a DIV
My intent is to have the generated IFRAME code in the PHP '$layerCode' variable.
How can i do that?
RE: FCK within a DIV