1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: cInclude("includes", "functions.lang.php");
19:
20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46:
47: class cTinyMCEEditor extends cWYSIWYGEditor {
48: 49:
50: var $_sBaseURL;
51:
52: 53:
54: var $_bUseGZIP = false;
55:
56: function cTinyMCEEditor($sEditorName, $sEditorContent) {
57: global $belang, $cfg, $cfgClient, $client, $lang, $idart;
58:
59: parent::__construct($sEditorName, $sEditorContent);
60: $this->_setEditor("tinymce3");
61:
62:
63: $this->_aSettings = getEffectiveSettingsByType("tinymce");
64:
65:
66: $this->_aSettings = array_merge(getEffectiveSettingsByType("wysiwyg"), $this->_aSettings);
67:
68: $this->_setSetting("article_url_suffix", 'front_content.php?idart=' . $idart, true);
69:
70:
71: $this->_setSetting("mode", "exact");
72: $aPathFragments = explode('/', $cfgClient[$client]["path"]["htmlpath"]);
73: $this->_setSetting("content_css", $cfgClient[$client]["path"]["htmlpath"] . "css/style_tiny.css");
74:
75: $this->_setSetting("theme", "advanced");
76: $this->_setSetting("theme_advanced_toolbar_location", "top");
77: $this->_setSetting("theme_advanced_path_location", "bottom");
78: $this->_setSetting("remove_script_host", false);
79: $this->_setSetting("file_browser_callback", "myCustomFileBrowser", true);
80:
81:
82: $this->_setSetting("theme_advanced_resizing", true);
83: $this->_setSetting("pagebreak_separator", "<!-- my page break -->");
84:
85: $this->_setSetting("apply_source_formatting", true);
86: $this->_setSetting("remove_linebreaks", false);
87:
88:
89: $this->_setSetting("convert_urls", false);
90: $this->_setSetting("relative_urls", false);
91:
92:
93: $this->_setSetting("elements", $sEditorName);
94:
95:
96: $aLangs = i18nGetAvailableLanguages();
97: $this->_setSetting("language", $aLangs[$belang][4]);
98: unset($aLangs);
99:
100:
101:
102:
103:
104:
105: $this->setBaseURL(preg_replace('/^https?:\/\/[^\/]+(.*)$/', '$1', $this->_getEditorPath()));
106:
107:
108: if (getEffectiveSetting("generator", "xhtml", false) == "true") {
109: $this->setXHTMLMode(true);
110: } else {
111: $this->setXHTMLMode(false);
112: }
113:
114:
115: if ($this->_aSettings["contenido_gzip"] == "true") {
116: $this->setGZIPMode(true);
117: } else {
118: $this->setGZIPMode(false);
119: }
120:
121:
122: if (!array_key_exists("content_css", $this->_aSettings) && array_key_exists("tinymce-stylesheet-file", $this->_aSettings)) {
123: $this->_setSetting("content_css", $this->_aSettings["tinymce-stylesheet-file"], true);
124: }
125:
126:
127: $this->setLists();
128:
129:
130: $this->setUserDefinedStyles();
131:
132:
133: $this->_setSetting("width", "100%");
134: $this->_setSetting("height", "480px");
135:
136:
137: $sDirection = langGetTextDirection($lang);
138: $this->_setSetting("directionality", $sDirection);
139:
140: if ($sDirection == "rtl") {
141: $this->_setSetting("theme_advanced_toolbar_align", "right", true);
142: } else {
143: $this->_setSetting("theme_advanced_toolbar_align", "left", true);
144: }
145:
146:
147: $this->_setSetting("plugin_insertdate_dateFormat", $this->convertFormat(getEffectiveSetting("dateformat", "date", "Y-m-d")));
148: $this->_setSetting("plugin_insertdate_timeFormat", $this->convertFormat(getEffectiveSetting("dateformat", "time", "H:i:s")));
149:
150:
151: $sMode = "full";
152: if (array_key_exists("tinymce-toolbar-mode", $this->_aSettings)) {
153: $sMode = $this->_aSettings["tinymce-toolbar-mode"];
154: }
155: if (array_key_exists("contenido_toolbar_mode", $this->_aSettings)) {
156: $sMode = $this->_aSettings["contenido_toolbar_mode"];
157: }
158: $this->setToolbar(trim(strtolower($sMode)));
159:
160: $autoFullElements = $this->_aSettings['auto_full_elements'];
161: unset($this->_aSettings['auto_full_elements']);
162:
163:
164: if (!array_key_exists("valid_elements", $this->_aSettings) && array_key_exists("tinymce-valid-elements", $this->_aSettings)) {
165: $this->_setSetting("valid_elements", $this->_aSettings["tinymce-valid-elements"], true);
166: }
167:
168:
169:
170: if ($autoFullElements === 'true') {
171: $this->_setSetting('valid_elements', '*[*]');
172: $this->_setSetting('extended_valid_elements', '*[*]');
173: }
174:
175: $this->_setSetting("valid_elements", "a[name|href|target|title],strong/b[class],em/i[class],strike[class],u[class],p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align|style],tr[class|rowspan|width|height|align|valign|style],td[dir|class|colspan|rowspan|width|height|align|valign|style],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr");
176:
177:
178: if (!array_key_exists("extended_valid_elements", $this->_aSettings) && array_key_exists("tinymce-extended-valid-elements", $this->_aSettings)) {
179: $this->_setSetting("extended_valid_elements", $this->_aSettings["tinymce-extended-valid-elements"]);
180: }
181:
182:
183:
184:
185: $this->_setSetting("extended_valid_elements", "form[name|action|method],textarea[name|style|cols|rows],input[type|name|value|style|onclick],a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]");
186:
187:
188: if (!array_key_exists("contenido_background_color", $this->_aSettings)) {
189: if (array_key_exists("tinymce-backgroundcolor", $this->_aSettings)) {
190: $this->_setSetting("contenido_background_color", $this->_aSettings["tinymce-backgroundcolor"], true);
191: } else {
192: $this->_setSetting("contenido_background_color", "white", true);
193: }
194: }
195:
196:
197: $this->cleanURLs();
198:
199:
200:
201: unset($this->_aSettings["contenido_toolbar_mode"], $this->_aSettings["contenido_lists"]);
202:
203: unset($this->_aSettings["tinymce-stylesheet-file"], $this->_aSettings["tinymce-valid-elements"], $this->_aSettings["tinymce-extended-valid-elements"], $this->_aSettings["tinymce-lists"], $this->_aSettings["tinymce-styles"], $this->_aSettings["tinymce-toolbar-mode"], $this->_aSettings["tinymce-toolbar1"], $this->_aSettings["tinymce-toolbar2"], $this->_aSettings["tinymce-toolbar3"], $this->_aSettings["tinymce-plugins"]);
204: }
205:
206: function convertFormat($sInput) {
207: $aFormatCodes = array(
208: "y" => "%y", "Y" => "%Y", "d" => "%d", "m" => "%m", "H" => "%H", "h" => "%I", "i" => "%M", "s" => "%S", "a" => "%P", "A" => "%P"
209: );
210:
211: foreach ($aFormatCodes as $sFormatCode => $sReplacement) {
212: $sInput = str_replace($sFormatCode, $sReplacement, $sInput);
213: }
214:
215: return ($sInput);
216: }
217:
218: function setUserDefinedStyles() {
219: $sStyles = "";
220:
221: if (array_key_exists("theme_advanced_styles", $this->_aSettings)) {
222: $sStyles = $this->_aSettings["theme_advanced_styles"];
223: } else if (array_key_exists("tinymce-styles", $this->_aSettings)) {
224: $sStyles = $this->_aSettings["tinymce-styles"];
225: }
226:
227: if ($sStyles) {
228: $this->_setSetting("theme_advanced_styles", preg_replace('/;$/i', '', str_replace("|", "=", trim($sStyles))), true);
229: }
230: }
231:
232: 233: 234: 235: 236:
237: function setLists($sLists = "") {
238: global $lang, $client;
239:
240: if ($sLists == "") {
241: if (array_key_exists("contenido_lists", $this->_aSettings)) {
242: $sLists = $this->_aSettings["contenido_lists"];
243: } else if (array_key_exists("tinymce-lists", $this->_aSettings)) {
244: $sLists = $this->_aSettings["tinymce-lists"];
245: }
246: }
247:
248: $aLists = array();
249: $aLists = explode(",", strtolower(str_replace(" ", "", $sLists)));
250:
251: if (in_array("link", $aLists)) {
252: $this->_setSetting("external_link_list_url", $this->_sBaseURL . "list.php?mode=link&lang=" . $lang . "&client=" . $client . "#", true);
253: }
254: if (in_array("image", $aLists)) {
255: $this->_setSetting("external_image_list_url", $this->_sBaseURL . "list.php?mode=image&lang=" . $lang . "&client=" . $client . "#", true);
256: }
257: if (in_array("flash", $aLists)) {
258: $this->_setSetting("flash_external_list_url", $this->_sBaseURL . "list.php?mode=flash&lang=" . $lang . "&client=" . $client . "#", true);
259: }
260: if (in_array("media", $aLists)) {
261: $this->_setSetting("media_external_list_url", $this->_sBaseURL . "list.php?mode=media&lang=" . $lang . "&client=" . $client . "#", true);
262: }
263: }
264:
265: function setXHTMLMode($bEnabled = true) {
266: if ($bEnabled) {
267: $this->_setSetting("cleanup_callback", "", true);
268: } else {
269: $this->_setSetting("cleanup_callback", "CustomCleanupContent", true);
270: }
271: }
272:
273: function setGZIPMode($bEnabled = true) {
274: if ($bEnabled) {
275: $this->_bUseGZIP = true;
276: } else {
277: $this->_bUseGZIP = false;
278: }
279: }
280:
281: 282: 283:
284: function setToolbar($sMode = "") {
285: global $cfg, $cfgClient, $client;
286:
287: switch ($sMode) {
288: case "full":
289: $this->_setSetting("theme_advanced_buttons1", "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,bold,italic,underline,strikethrough,sub,sup,|,insertdate,inserttime,preview,|,styleselect,|,visualchars,nonbreaking,template,pagebreak,|,help,|,fullscreen", true);
290: $this->_setSetting("theme_advanced_buttons2", "link,unlink,anchor,image,media,advhr,|,bullist,numlist,|,outdent,indent,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,ltr,rtl,|,visualaid,charmap,cleanup,|,code", true);
291: $this->_setSetting("theme_advanced_buttons3", "tablecontrols,|,formatselect,fontselect,fontsizeselect,|,styleprops,|,cite,abbr,acronym,del,ins,attribs", true);
292:
293: $this->_setSetting("plugins", "safari,table,save,advhr,advimage,advlink,pagebreak,style,layer,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups", true);
294: $this->_setSetting("theme_advanced_toolbar_align", "left", true);
295:
296: $aCustSettings = getEffectiveSettingsByType("tinymce");
297: foreach ($aCustSettings as $sKey => $sValue) {
298: $this->_setSetting($sKey, $sValue, true);
299: }
300:
301: break;
302:
303: case "fullscreen":
304: $this->_setSetting("theme_advanced_buttons1", "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,bold,italic,underline,strikethrough,sub,sup,|,insertdate,inserttime,preview,|,styleselect,|,visualchars,nonbreaking,template,pagebreak,|,help,|,fullscreen", true);
305: $this->_setSetting("theme_advanced_buttons2", "link,unlink,anchor,image,media,advhr,|,bullist,numlist,|,outdent,indent,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,ltr,rtl,|,visualaid,charmap,cleanup,|,code", true);
306: $this->_setSetting("theme_advanced_buttons3", "tablecontrols,|,formatselect,fontselect,fontsizeselect,|,styleprops,|,cite,abbr,acronym,del,ins,attribs", true);
307:
308: $this->_setSetting("plugins", "safari,table,save,advhr,advimage,advlink,pagebreak,style,layer,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups", true);
309: $this->_setSetting("theme_advanced_toolbar_align", "left", true);
310:
311: $aCustSettings = getEffectiveSettingsByType("tinymce_fullscreen");
312: foreach ($aCustSettings as $sKey => $sValue) {
313: $this->_setSetting($sKey, $sValue, true);
314: }
315:
316: break;
317:
318: case "simple":
319: $this->_setSetting("theme_advanced_buttons1", "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,bold,italic,underline,strikethrough,sub,sup,|,insertdate,inserttime,preview,|,styleselect", true);
320: $this->_setSetting("theme_advanced_buttons2", "link,unlink,anchor,image,flash,advhr,|,bullist,numlist,|,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,ltr,rtl,|,visualaid,charmap,cleanup,|,code", true);
321: $this->_setSetting("theme_advanced_buttons3", "", true);
322: $this->_setSetting("plugins", "advhr,advimage,advlink,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality", true);
323:
324: $aCustSettings = getEffectiveSettingsByType("tinymce_simple");
325: foreach ($aCustSettings as $sKey => $sValue) {
326: $this->_setSetting($sKey, $sValue, true);
327: }
328:
329: break;
330:
331: case "mini":
332: $this->_setSetting("theme_advanced_buttons1", "undo,redo,|,bold,italic,underline,strikethrough,|,link", true);
333: $this->_setSetting("theme_advanced_buttons2", "", true);
334: $this->_setSetting("theme_advanced_buttons3", "", true);
335:
336: $aCustSettings = getEffectiveSettingsByType("tinymce_mini");
337: foreach ($aCustSettings as $sKey => $sValue) {
338: $this->_setSetting($sKey, $sValue, true);
339: }
340:
341: break;
342:
343: case "custom":
344:
345:
346:
347: $this->_setSetting("theme_advanced_buttons1", $this->_aSettings["tinymce-toolbar1"]);
348: $this->_setSetting("theme_advanced_buttons2", $this->_aSettings["tinymce-toolbar2"]);
349: $this->_setSetting("theme_advanced_buttons3", $this->_aSettings["tinymce-toolbar3"]);
350: $this->_setSetting("plugins", $this->_aSettings["tinymce-plugins"]);
351: $this->_setSetting("theme_advanced_toolbar_location", "bottom");
352:
353: $aCustSettings = getEffectiveSettingsByType("tinymce_custom");
354: foreach ($aCustSettings as $sKey => $sValue) {
355: $this->_setSetting($sKey, $sValue, true);
356: }
357:
358: break;
359:
360: case "inline_edit":
361: $this->_setSetting("theme_advanced_buttons1", "bold,italic,underline,strikethrough,separator,undo,separator,bullist,numlist,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,separator,fullscreen,separator,save,close", true);
362: $this->_setSetting("theme_advanced_buttons2", "", true);
363: $this->_setSetting("theme_advanced_buttons3", "", true);
364:
365: $this->_setSetting("setupcontent_callback", "myCustomSetupContent", true);
366:
367: $this->_unsetSetting("width");
368: $this->_unsetSetting("theme_advanced_toolbar_location");
369: $this->_setSetting("theme_advanced_toolbar_location", "external");
370: $this->_setSetting("height", "210px", true);
371: $this->_setSetting("plugins", "table,inlinepopups,fullscreen,close", true);
372: $this->_setSetting("mode", "exact", true);
373: $this->_setSetting("elements", "*", true);
374: $this->_setSetting("content_css", $cfgClient[$client]["path"]["htmlpath"] . "css/style_tiny.css", true);
375:
376: if (!array_key_exists("auto_resize", $this->_aSettings)) {
377: $this->_setSetting("auto_resize", "false", true);
378: }
379:
380: if (!array_key_exists("theme_advanced_toolbar_location", $this->_aSettings)) {
381: $this->_setSetting("theme_advanced_toolbar_location", "top", true);
382: }
383:
384: if (!array_key_exists("theme_advanced_resizing_use_cookie", $this->_aSettings)) {
385: $this->_setSetting("theme_advanced_resizing_use_cookie", "false", true);
386: }
387:
388: if (!array_key_exists("theme_advanced_toolbar_align", $this->_aSettings)) {
389: $this->_setSetting("theme_advanced_toolbar_align", "center", true);
390: }
391:
392: $aCustSettings = getEffectiveSettingsByType("tinymce_inline");
393: foreach ($aCustSettings as $sKey => $sValue) {
394: $this->_setSetting($sKey, $sValue, true);
395: }
396:
397: break;
398:
399: default:
400: $this->_setSetting("theme_advanced_buttons1", "undo,redo,|,bold,italic,underline,strikethrough,|,link,unlink,anchor,image,flash,advhr,|,tablecontrols", true);
401: $this->_setSetting("theme_advanced_buttons2", "styleselect,|,bullist,numlist,|,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,sub,sup,|,code", true);
402: $this->_setSetting("theme_advanced_buttons3", "", true);
403: $this->_setSetting("plugins", "table,advhr,advimage,advlink,flash,searchreplace,contextmenu,paste", true);
404:
405: $aCustSettings = getEffectiveSettingsByType("tinymce_default");
406: foreach ($aCustSettings as $sKey => $sValue) {
407: $this->_setSetting($sKey, $sValue, true);
408: }
409: }
410: }
411:
412: function cleanURLs() {
413: global $sess;
414:
415:
416: $aParameters = array(
417:
418: 'content_css', 'popups_css', 'popups_css_add', 'editor_css',
419: 'plugin_preview_pageurl',
420: 'media_external_list_url',
421: 'template_external_list_url'
422: );
423:
424: foreach ($aParameters as $sParameter) {
425: if (array_key_exists($sParameter, $this->_aSettings)) {
426: $this->_setSetting($sParameter, $this->addPath($this->_aSettings[$sParameter]), true);
427: }
428: }
429:
430:
431: $aParameters = array(
432: 'media_external_list_url',
433: 'template_external_list_url'
434: );
435:
436: foreach ($aParameters as $sParameter) {
437: if (array_key_exists($sParameter, $this->_aSettings) && preg_match('/\\.php$/i', $this->_aSettings[$sParameter])) {
438: $this->_setSetting($sParameter, $this->_aSettings[$sParameter] . '?contenido=' . $sess->id, true);
439: }
440: }
441: }
442:
443: function addPath($sFile) {
444: global $cfgClient, $client;
445:
446:
447: if (!preg_match('/^(http|https):\/\/((?:[a-zA-Z0-9_-]+\.?)+):?(\d*)/', $sFile)) {
448: if (preg_match('/^\//', $sFile)) {
449: $sFile = "http://" . $_SERVER['HTTP_HOST'] . $sFile;
450: } else {
451: $sFile = $cfgClient[$client]["htmlpath"]["frontend"] . $sFile;
452: }
453: }
454:
455: return $sFile;
456: }
457:
458: function setBaseURL($sBaseUrl) {
459: $this->_sBaseURL = $sBaseUrl;
460: }
461:
462: function _getScripts() {
463: if ($this->_bUseGZIP) {
464: $sReturn = "\n<!-- tinyMCE -->\n" . '<script language="javascript" type="text/javascript" src="' . $this->_sBaseURL . 'jscripts/tiny_mce/tiny_mce_gzip.js"></script>';
465: } else {
466: $sReturn = "\n<!-- tinyMCE -->\n" . '<script language="javascript" type="text/javascript" src="' . $this->_sBaseURL . 'jscripts/tiny_mce/tiny_mce.js"></script>';
467: }
468:
469: return $sReturn;
470: }
471:
472: function _getEditor() {
473: global $sess, $cfg, $lang, $client, $idart, $cfgClient;
474:
475:
476: $browserparameters = array("restrict_imagebrowser" => array("jpg", "gif", "jpeg", "png"));
477: $sess->register("browserparameters");
478:
479:
480: $this->_setSetting("setupcontent_callback", 'myCustomSetupContent', true);
481: $this->_setSetting("save_callback", 'cutFullpath', true);
482:
483:
484:
485: $oTemplate = new cTemplate;
486: $oTemplate->set('s', 'IMAGEBROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
487: $oTemplate->set('s', 'FILEBROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=filebrowser');
488: $oTemplate->set('s', 'FLASHBROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
489: $oTemplate->set('s', 'MEDIABROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
490: $oTemplate->set('s', 'FRONTEND_PATH', $cfgClient[$client]["path"]["htmlpath"]);
491:
492:
493: if ($this->_bUseGZIP) {
494: $sGZIPScript = "<script language=\"JavaScript\" type=\"text/javascript\">\n" . " tinyMCE_GZ.init({ \n" . " plugins : '" . $this->_aSettings["plugins"] . "', \n" . " themes : '" . $this->_aSettings["theme"] . "', \n" . " languages : '" . $this->_aSettings["language"] . "', \n" . " disk_cache : true, \n" . " debug : false \n" . "});\n" . "</script>\n";
495: $oTemplate->set('s', 'COMPRESSOR', $sGZIPScript);
496: } else {
497: $oTemplate->set('s', 'COMPRESSOR', '');
498: }
499:
500:
501: $sConfig = '';
502:
503: foreach ($this->_aSettings as $sKey => $sValue) {
504: if (is_bool($sValue)) {
505: if ($sValue === true) {
506: $sValue = "true";
507: } else {
508: $sValue = "false";
509: }
510: }
511:
512: if ($sValue == "true" || $sValue == "false" || $sKey == "oninit" || $sKey == "onpageload" || $sKey == 'style_formats') {
513: $sConfig .= "'$sKey': " . $sValue;
514: } else {
515: $sConfig .= "'$sKey': '" . $sValue . "'";
516: }
517: $sConfig .= ",\n\t";
518: }
519:
520: $sConfig = substr($sConfig, 0, -3);
521: $oTemplate->set('s', 'CONFIG', $sConfig);
522:
523: $oTxtEditor = new cHTMLTextarea($this->_sEditorName, $this->_sEditorContent);
524: $oTxtEditor->setId($this->_sEditorName);
525:
526: $sBgColor = $this->_aSettings["contenido_background_color"];
527:
528: $oTxtEditor->setStyle("width: " . $this->_aSettings["width"] . "; height: " . $this->_aSettings["height"] . "; background-color: " . $sBgColor . ";");
529:
530: $sReturn = $oTemplate->generate($cfg['path']['all_wysiwyg'] . $this->_sEditor . "/tinymce.tpl.html", true);
531: $sReturn .= $oTxtEditor->render();
532:
533: return $sReturn;
534: }
535:
536: function getConfigInlineEdit() {
537: $sConfig = '';
538: $this->setToolbar('inline_edit');
539:
540: foreach ($this->_aSettings as $sKey => $sValue) {
541: if (is_bool($sValue)) {
542: if ($sValue === true) {
543: $sValue = "true";
544: } else {
545: $sValue = "false";
546: }
547: }
548:
549: if ($sValue == "true" || $sValue == "false" || $sKey == "oninit" || $sKey == "onpageload" || $sKey == 'style_formats') {
550: $sConfig .= "'$sKey': " . $sValue;
551: } else {
552: $sConfig .= "'$sKey': '" . $sValue . "'";
553: }
554: $sConfig .= ",\n\t";
555: }
556:
557: $sConfig = substr($sConfig, 0, -3);
558:
559: return $sConfig;
560: }
561:
562: function getConfigFullscreen() {
563: $sConfig = '';
564: $this->setToolbar('fullscreen');
565:
566: $sConfig .= "'theme_advanced_buttons1': '" . $this->_aSettings['theme_advanced_buttons1'] . "',\n";
567: $sConfig .= "'theme_advanced_buttons2': '" . $this->_aSettings['theme_advanced_buttons2'] . "',\n";
568: $sConfig .= "'theme_advanced_buttons3': '" . $this->_aSettings['theme_advanced_buttons3'] . "',\n";
569: $sConfig .= "'theme_advanced_toolbar_align': '" . $this->_aSettings['theme_advanced_toolbar_align'] . "',\n";
570: $sConfig .= "'plugins': '" . $this->_aSettings['plugins'] . "'\n";
571:
572: return $sConfig;
573: }
574: }
575:
576: ?>