45 $this->rootPath =
"/class/xoopseditor/tinymce";
47 $this->configs[
"elements"] = $this->
getName();
50 $this->configs[
"area_width"] = isset($this->configs[
"width"]) ? $this->configs[
"width"] :
$this->width;
51 $this->configs[
"area_height"] = isset($this->configs[
"height"]) ? $this->configs[
"height"] :
$this->height;
52 $this->configs[
"fonts"] = $this->
getFonts();
54 require_once dirname(__FILE__) .
"/tinymce.php";
55 $this->editor =
new TinyMCE($this->configs);
77 $eltmsg = str_replace(
'"',
'\"', stripslashes( $eltmsg ) );
79 $ret.=
"if ( tinyMCE.get('{$eltname}').getContent() == \"\" || tinyMCE.get('{$eltname}').getContent() == null) ";
80 $ret.=
"{ window.alert(\"{$eltmsg}\"); tinyMCE.get('{$eltname}').focus(); return false; }";
93 if ($this->language) {
96 if (defined(
"_XOOPS_EDITOR_TINYMCE_LANGUAGE")) {
97 $this->language = strtolower(constant(
"_XOOPS_EDITOR_TINYMCE_LANGUAGE"));
99 $this->language = str_replace(
'_',
'-', strtolower(
_LANGCODE));
100 if(strtolower(
_CHARSET) ==
"utf-8") {
101 $this->language .=
"_utf8";
110 if (empty($this->config[
"fonts"]) && defined(
"_XOOPS_EDITOR_TINYMCE_FONTS")) {
111 $this->config[
"fonts"] = constant(
"_XOOPS_EDITOR_TINYMCE_FONTS");
114 return @$this->config[
"fonts"];
124 $ret = $this->editor->render();
125 $ret .= parent::render();
137 return is_readable(XOOPS_ROOT_PATH . $this->rootPath .
"/tinymce.php");