47 $this->rootPath =
"/class/xoopseditor/tinymce4";
49 $this->configs[
"elements"] = $this->
getName();
52 $this->configs[
"area_width"] = isset($this->configs[
"width"]) ? $this->configs[
"width"] :
$this->width;
53 $this->configs[
"area_height"] = isset($this->configs[
"height"]) ? $this->configs[
"height"] :
$this->height;
54 $this->configs[
"fonts"] = $this->
getFonts();
56 require_once __DIR__ .
"/tinymce.php";
57 $this->editor =
new TinyMCE($this->configs);
74 $eltmsg = str_replace(
'"',
'\"', stripslashes($eltmsg));
76 $ret.=
"if ( tinyMCE.get('{$eltname}').getContent() == \"\" || tinyMCE.get('{$eltname}').getContent() == null) ";
77 $ret.=
"{ window.alert(\"{$eltmsg}\"); tinyMCE.get('{$eltname}').focus(); return false; }";
92 if ($this->language) {
95 if (defined(
"_XOOPS_EDITOR_TINYMCE4_LANGUAGE")) {
96 $this->language = strtolower(constant(
"_XOOPS_EDITOR_TINYMCE4_LANGUAGE"));
98 $this->language = str_replace(
'_',
'-', strtolower(
_LANGCODE));
99 if (strtolower(_CHARSET) ==
"utf-8") {
100 $this->language .=
"_utf8";
109 if (empty($this->
config[
"fonts"]) && defined(
"_XOOPS_EDITOR_TINYMCE4_FONTS")) {
110 $this->
config[
"fonts"] = constant(
"_XOOPS_EDITOR_TINYMCE4_FONTS");
113 return @$this->
config[
"fonts"];
123 $ret = $this->editor->render();
124 $ret .= parent::render();
defined('DS') or define('DS' DIRECTORY_SEPARATOR
if(DIRECTORY_SEPARATOR!="/") $xoops_root_path