Posted: Tue Apr 18, 2006 10:54 pm
Part of the project I'm involved with is more than likely going to involve copy/pasting ascii report printouts into the htmlarea "detail description" field. I have discovered that FCKEditor doesn't deal with this copy/paste item very well. I have tested TinyMCE and it deals with it perfectly. So I am now trying to get TinyMCE to be the editor du jour.
I installed TinyMCE in dataface/lib, then I modified the following two files:
1. dataface/config.inc.php thus:
// if ( !defined('DATAFACE_FCKEDITOR_BASEPATH') ){
// Webserver path to the FCKEditor installation for use with Dataface
// define('DATAFACE_FCKEDITOR_BASEPATH', DATAFACE_URL.'/lib/FCKeditor/');
// $GLOBALS['HTML_QuickForm_htmlarea']['FCKeditor_BasePath'] = DATAFACE_FCKEDITOR_BASEPATH;
//}
if ( !defined('DATAFACE_TINYMCE_BASEPATH') ){
// Webserver path to the TinyMCEditor installation for use with Dataface
define('DATAFACE_TINYMCE_BASEPATH', DATAFACE_URL.'/lib/tinymce/');
$GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'] = DATAFACE_TINYMCE_BASEPATH;
}
2. dataface/HTML/QuickForm/htmlarea.php thus:
require_once 'HTML/QuickForm/textarea.php';
require_once 'tinymce/jscripts/tiny_mce/tinymce.php';
$GLOBALS['HTML_QuickForm_htmlarea'] = array(
'tinymce_BasePath' => ( isset($GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath']) ? $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'] : './lib/tinymce'));
...
function toHtml()
{
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} else {
$editor = new tinymce($this->getName());
$editor->BasePath = $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'];
$editor->Value = $this->_value;
$editor->Width = '100%';
$editor->Height = '480';
ob_start();
$editor->Create();
$html = ob_get_contents();
ob_end_clean();
return $html;
}
} //end func toHtml
I'm getting the following error upon attempting to load Dataface:
Fatal error: Cannot instantiate non-existent class: tinymce in /home/iponlyno/public_html/dataface/HTML/QuickForm/htmlarea.php on line 49
line 49 is: $editor = new tinymce($this->getName());
Have I missed a file somewhere referencing $editor? Should I just capitalize every instance of "tinyMCE"? When I view the source of the page with the error, I can see all the TinyMCE initialization and some calendar.js stuff the Dataface loads. Then the error message. So everything looks good up to line 49 above. I would really appreciate any input you might have for me. Thanks.
Michael Wassil
I installed TinyMCE in dataface/lib, then I modified the following two files:
1. dataface/config.inc.php thus:
// if ( !defined('DATAFACE_FCKEDITOR_BASEPATH') ){
// Webserver path to the FCKEditor installation for use with Dataface
// define('DATAFACE_FCKEDITOR_BASEPATH', DATAFACE_URL.'/lib/FCKeditor/');
// $GLOBALS['HTML_QuickForm_htmlarea']['FCKeditor_BasePath'] = DATAFACE_FCKEDITOR_BASEPATH;
//}
if ( !defined('DATAFACE_TINYMCE_BASEPATH') ){
// Webserver path to the TinyMCEditor installation for use with Dataface
define('DATAFACE_TINYMCE_BASEPATH', DATAFACE_URL.'/lib/tinymce/');
$GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'] = DATAFACE_TINYMCE_BASEPATH;
}
2. dataface/HTML/QuickForm/htmlarea.php thus:
require_once 'HTML/QuickForm/textarea.php';
require_once 'tinymce/jscripts/tiny_mce/tinymce.php';
$GLOBALS['HTML_QuickForm_htmlarea'] = array(
'tinymce_BasePath' => ( isset($GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath']) ? $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'] : './lib/tinymce'));
...
function toHtml()
{
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} else {
$editor = new tinymce($this->getName());
$editor->BasePath = $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'];
$editor->Value = $this->_value;
$editor->Width = '100%';
$editor->Height = '480';
ob_start();
$editor->Create();
$html = ob_get_contents();
ob_end_clean();
return $html;
}
} //end func toHtml
I'm getting the following error upon attempting to load Dataface:
Fatal error: Cannot instantiate non-existent class: tinymce in /home/iponlyno/public_html/dataface/HTML/QuickForm/htmlarea.php on line 49
line 49 is: $editor = new tinymce($this->getName());
Have I missed a file somewhere referencing $editor? Should I just capitalize every instance of "tinyMCE"? When I view the source of the page with the error, I can see all the TinyMCE initialization and some calendar.js stuff the Dataface loads. Then the error message. So everything looks good up to line 49 above. I would really appreciate any input you might have for me. Thanks.
Michael Wassil