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", "Con.Tiny.customFileBrowserCallback", 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:
106: $this->setBaseURL($this->_getEditorPath());
107:
108:
109: if (getEffectiveSetting("generator", "xhtml", false) == "true") {
110: $this->setXHTMLMode(true);
111: } else {
112: $this->setXHTMLMode(false);
113: }
114:
115:
116: if ($this->_aSettings["contenido_gzip"] == "true") {
117: $this->setGZIPMode(true);
118: } else {
119: $this->setGZIPMode(false);
120: }
121:
122:
123: if (!array_key_exists("content_css", $this->_aSettings) && array_key_exists("tinymce-stylesheet-file", $this->_aSettings)) {
124: $this->_setSetting("content_css", $this->_aSettings["tinymce-stylesheet-file"], true);
125: }
126:
127:
128: $this->setLists();
129:
130:
131: $this->setUserDefinedStyles();
132:
133:
134: $this->_setSetting("width", "100%");
135: $this->_setSetting("height", "480px");
136:
137:
138: $sDirection = langGetTextDirection($lang);
139: $this->_setSetting("directionality", $sDirection);
140:
141: if ($sDirection == "rtl") {
142: $this->_setSetting("theme_advanced_toolbar_align", "right", true);
143: } else {
144: $this->_setSetting("theme_advanced_toolbar_align", "left", true);
145: }
146:
147:
148: $this->_setSetting("plugin_insertdate_dateFormat", $this->convertFormat(getEffectiveSetting("dateformat", "date", "Y-m-d")));
149: $this->_setSetting("plugin_insertdate_timeFormat", $this->convertFormat(getEffectiveSetting("dateformat", "time", "H:i:s")));
150:
151:
152: $sMode = "full";
153: if (array_key_exists("tinymce-toolbar-mode", $this->_aSettings)) {
154: $sMode = $this->_aSettings["tinymce-toolbar-mode"];
155: }
156: if (array_key_exists("contenido_toolbar_mode", $this->_aSettings)) {
157: $sMode = $this->_aSettings["contenido_toolbar_mode"];
158: }
159: $this->setToolbar(trim(strtolower($sMode)));
160:
161: $autoFullElements = $this->_aSettings['auto_full_elements'];
162: unset($this->_aSettings['auto_full_elements']);
163:
164:
165: if (!array_key_exists("valid_elements", $this->_aSettings) && array_key_exists("tinymce-valid-elements", $this->_aSettings)) {
166: $this->_setSetting("valid_elements", $this->_aSettings["tinymce-valid-elements"], true);
167: }
168:
169:
170:
171: if ($autoFullElements === 'true') {
172: $this->_setSetting('valid_elements', '*[*]');
173: $this->_setSetting('extended_valid_elements', '*[*]');
174: }
175:
176: $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");
177:
178:
179: if (!array_key_exists("extended_valid_elements", $this->_aSettings) && array_key_exists("tinymce-extended-valid-elements", $this->_aSettings)) {
180: $this->_setSetting("extended_valid_elements", $this->_aSettings["tinymce-extended-valid-elements"]);
181: }
182:
183:
184:
185:
186: $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]");
187:
188:
189: if (!array_key_exists("contenido_background_color", $this->_aSettings)) {
190: if (array_key_exists("tinymce-backgroundcolor", $this->_aSettings)) {
191: $this->_setSetting("contenido_background_color", $this->_aSettings["tinymce-backgroundcolor"], true);
192: } else {
193: $this->_setSetting("contenido_background_color", "white", true);
194: }
195: }
196:
197:
198: $this->cleanURLs();
199:
200:
201:
202: unset($this->_aSettings["contenido_toolbar_mode"], $this->_aSettings["contenido_lists"]);
203:
204: 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"]);
205: }
206:
207: function convertFormat($sInput) {
208: $aFormatCodes = array(
209: "y" => "%y", "Y" => "%Y", "d" => "%d", "m" => "%m", "H" => "%H", "h" => "%I", "i" => "%M", "s" => "%S", "a" => "%P", "A" => "%P"
210: );
211:
212: foreach ($aFormatCodes as $sFormatCode => $sReplacement) {
213: $sInput = str_replace($sFormatCode, $sReplacement, $sInput);
214: }
215:
216: return ($sInput);
217: }
218:
219: function setUserDefinedStyles() {
220: $sStyles = "";
221:
222: if (array_key_exists("theme_advanced_styles", $this->_aSettings)) {
223: $sStyles = $this->_aSettings["theme_advanced_styles"];
224: } else if (array_key_exists("tinymce-styles", $this->_aSettings)) {
225: $sStyles = $this->_aSettings["tinymce-styles"];
226: }
227:
228: if ($sStyles) {
229: $this->_setSetting("theme_advanced_styles", preg_replace('/;$/i', '', str_replace("|", "=", trim($sStyles))), true);
230: }
231: }
232:
233: 234: 235: 236: 237:
238: function setLists($sLists = "") {
239: global $lang, $client;
240:
241: if ($sLists == "") {
242: if (array_key_exists("contenido_lists", $this->_aSettings)) {
243: $sLists = $this->_aSettings["contenido_lists"];
244: } else if (array_key_exists("tinymce-lists", $this->_aSettings)) {
245: $sLists = $this->_aSettings["tinymce-lists"];
246: }
247: }
248:
249: $aLists = array();
250: $aLists = explode(",", strtolower(str_replace(" ", "", $sLists)));
251:
252: if (in_array("link", $aLists)) {
253: $this->_setSetting("external_link_list_url", $this->_sBaseURL . "list.php?mode=link&lang=" . $lang . "&client=" . $client . "#", true);
254: }
255: if (in_array("image", $aLists)) {
256: $this->_setSetting("external_image_list_url", $this->_sBaseURL . "list.php?mode=image&lang=" . $lang . "&client=" . $client . "#", true);
257: }
258: if (in_array("flash", $aLists)) {
259: $this->_setSetting("flash_external_list_url", $this->_sBaseURL . "list.php?mode=flash&lang=" . $lang . "&client=" . $client . "#", true);
260: }
261: if (in_array("media", $aLists)) {
262: $this->_setSetting("media_external_list_url", $this->_sBaseURL . "list.php?mode=media&lang=" . $lang . "&client=" . $client . "#", true);
263: }
264: }
265:
266: function setXHTMLMode($bEnabled = true) {
267: if ($bEnabled) {
268: $this->_setSetting("cleanup_callback", "", true);
269: } else {
270: $this->_setSetting("cleanup_callback", "Con.Tiny.customCleanupCallback", true);
271: }
272: }
273:
274: function setGZIPMode($bEnabled = true) {
275: if ($bEnabled) {
276: $this->_bUseGZIP = true;
277: } else {
278: $this->_bUseGZIP = false;
279: }
280: }
281:
282: 283: 284:
285: function setToolbar($sMode = "") {
286: global $cfg, $cfgClient, $client;
287:
288: switch ($sMode) {
289: case "full":
290: $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);
291: $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);
292: $this->_setSetting("theme_advanced_buttons3", "tablecontrols,|,formatselect,fontselect,fontsizeselect,|,styleprops,|,cite,abbr,acronym,del,ins,attribs", true);
293:
294: $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);
295: $this->_setSetting("theme_advanced_toolbar_align", "left", true);
296:
297: $aCustSettings = getEffectiveSettingsByType("tinymce");
298: foreach ($aCustSettings as $sKey => $sValue) {
299: $this->_setSetting($sKey, $sValue, true);
300: }
301:
302: break;
303:
304: case "fullscreen":
305: $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);
306: $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);
307: $this->_setSetting("theme_advanced_buttons3", "tablecontrols,|,formatselect,fontselect,fontsizeselect,|,styleprops,|,cite,abbr,acronym,del,ins,attribs", true);
308:
309: $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);
310: $this->_setSetting("theme_advanced_toolbar_align", "left", true);
311:
312: $aCustSettings = getEffectiveSettingsByType("tinymce_fullscreen");
313: foreach ($aCustSettings as $sKey => $sValue) {
314: $this->_setSetting($sKey, $sValue, true);
315: }
316:
317: break;
318:
319: case "simple":
320: $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);
321: $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);
322: $this->_setSetting("theme_advanced_buttons3", "", true);
323: $this->_setSetting("plugins", "advhr,advimage,advlink,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality", true);
324:
325: $aCustSettings = getEffectiveSettingsByType("tinymce_simple");
326: foreach ($aCustSettings as $sKey => $sValue) {
327: $this->_setSetting($sKey, $sValue, true);
328: }
329:
330: break;
331:
332: case "mini":
333: $this->_setSetting("theme_advanced_buttons1", "undo,redo,|,bold,italic,underline,strikethrough,|,link", true);
334: $this->_setSetting("theme_advanced_buttons2", "", true);
335: $this->_setSetting("theme_advanced_buttons3", "", true);
336:
337: $aCustSettings = getEffectiveSettingsByType("tinymce_mini");
338: foreach ($aCustSettings as $sKey => $sValue) {
339: $this->_setSetting($sKey, $sValue, true);
340: }
341:
342: break;
343:
344: case "custom":
345:
346:
347:
348: $this->_setSetting("theme_advanced_buttons1", $this->_aSettings["tinymce-toolbar1"]);
349: $this->_setSetting("theme_advanced_buttons2", $this->_aSettings["tinymce-toolbar2"]);
350: $this->_setSetting("theme_advanced_buttons3", $this->_aSettings["tinymce-toolbar3"]);
351: $this->_setSetting("plugins", $this->_aSettings["tinymce-plugins"]);
352: $this->_setSetting("theme_advanced_toolbar_location", "bottom");
353:
354: $aCustSettings = getEffectiveSettingsByType("tinymce_custom");
355: foreach ($aCustSettings as $sKey => $sValue) {
356: $this->_setSetting($sKey, $sValue, true);
357: }
358:
359: break;
360:
361: case "inline_edit":
362: $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);
363: $this->_setSetting("theme_advanced_buttons2", "", true);
364: $this->_setSetting("theme_advanced_buttons3", "", true);
365:
366: $this->_setSetting("setupcontent_callback", "Con.Tiny.customSetupContentCallback", true);
367:
368: $this->_unsetSetting("width");
369: $this->_unsetSetting("theme_advanced_toolbar_location");
370: $this->_setSetting("theme_advanced_toolbar_location", "external");
371: $this->_setSetting("height", "210px", true);
372: $this->_setSetting("plugins", "table,inlinepopups,fullscreen,close", true);
373: $this->_setSetting("mode", "exact", true);
374: $this->_setSetting("elements", "*", true);
375: $this->_setSetting("content_css", $cfgClient[$client]["path"]["htmlpath"] . "css/style_tiny.css", true);
376:
377: if (!array_key_exists("auto_resize", $this->_aSettings)) {
378: $this->_setSetting("auto_resize", "false", true);
379: }
380:
381: if (!array_key_exists("theme_advanced_toolbar_location", $this->_aSettings)) {
382: $this->_setSetting("theme_advanced_toolbar_location", "top", true);
383: }
384:
385: if (!array_key_exists("theme_advanced_resizing_use_cookie", $this->_aSettings)) {
386: $this->_setSetting("theme_advanced_resizing_use_cookie", "false", true);
387: }
388:
389: if (!array_key_exists("theme_advanced_toolbar_align", $this->_aSettings)) {
390: $this->_setSetting("theme_advanced_toolbar_align", "center", true);
391: }
392:
393: $aCustSettings = getEffectiveSettingsByType("tinymce_inline");
394: foreach ($aCustSettings as $sKey => $sValue) {
395: $this->_setSetting($sKey, $sValue, true);
396: }
397:
398: break;
399:
400: default:
401: $this->_setSetting("theme_advanced_buttons1", "undo,redo,|,bold,italic,underline,strikethrough,|,link,unlink,anchor,image,flash,advhr,|,tablecontrols", true);
402: $this->_setSetting("theme_advanced_buttons2", "styleselect,|,bullist,numlist,|,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,sub,sup,|,code", true);
403: $this->_setSetting("theme_advanced_buttons3", "", true);
404: $this->_setSetting("plugins", "table,advhr,advimage,advlink,flash,searchreplace,contextmenu,paste", true);
405:
406: $aCustSettings = getEffectiveSettingsByType("tinymce_default");
407: foreach ($aCustSettings as $sKey => $sValue) {
408: $this->_setSetting($sKey, $sValue, true);
409: }
410: }
411: }
412:
413: function cleanURLs() {
414: global $sess;
415:
416:
417: $aParameters = array(
418:
419: 'content_css', 'popups_css', 'popups_css_add', 'editor_css',
420: 'plugin_preview_pageurl',
421: 'media_external_list_url',
422: 'template_external_list_url'
423: );
424:
425: foreach ($aParameters as $sParameter) {
426: if (array_key_exists($sParameter, $this->_aSettings)) {
427: $this->_setSetting($sParameter, $this->addPath($this->_aSettings[$sParameter]), true);
428: }
429: }
430:
431:
432: $aParameters = array(
433: 'media_external_list_url',
434: 'template_external_list_url'
435: );
436:
437: foreach ($aParameters as $sParameter) {
438: if (array_key_exists($sParameter, $this->_aSettings) && preg_match('/\\.php$/i', $this->_aSettings[$sParameter])) {
439: $this->_setSetting($sParameter, $this->_aSettings[$sParameter] . '?contenido=' . $sess->id, true);
440: }
441: }
442: }
443:
444: function addPath($sFile) {
445: global $cfgClient, $client;
446:
447:
448: if (!preg_match('/^(http|https):\/\/((?:[a-zA-Z0-9_-]+\.?)+):?(\d*)/', $sFile)) {
449: if (preg_match('/^\//', $sFile)) {
450: $sFile = "http://" . $_SERVER['HTTP_HOST'] . $sFile;
451: } else {
452: $sFile = $cfgClient[$client]["htmlpath"]["frontend"] . $sFile;
453: }
454: }
455:
456: return $sFile;
457: }
458:
459: function setBaseURL($sBaseUrl) {
460: $this->_sBaseURL = $sBaseUrl;
461: }
462:
463: function _getScripts() {
464: if ($this->_bUseGZIP) {
465: $sReturn = "\n<!-- tinyMCE -->\n" . '<script language="javascript" type="text/javascript" src="' . $this->_sBaseURL . 'jscripts/tiny_mce/tiny_mce_gzip.js"></script>';
466: } else {
467: $sReturn = "\n<!-- tinyMCE -->\n" . '<script language="javascript" type="text/javascript" src="' . $this->_sBaseURL . 'jscripts/tiny_mce/tiny_mce.js"></script>';
468: }
469:
470: return $sReturn;
471: }
472:
473: function _getEditor() {
474: global $sess, $cfg, $lang, $client, $idart, $cfgClient;
475:
476:
477: $browserparameters = array("restrict_imagebrowser" => array("jpg", "gif", "jpeg", "png"));
478: $sess->register("browserparameters");
479:
480:
481: $this->_setSetting("setupcontent_callback", 'Con.Tiny.customSetupContentCallback', true);
482: $this->_setSetting("save_callback", 'Con.Tiny.customSaveCallback', true);
483:
484:
485:
486: $oTemplate = new cTemplate();
487: $oTemplate->set('s', 'IMAGEBROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
488: $oTemplate->set('s', 'FILEBROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=filebrowser');
489: $oTemplate->set('s', 'FLASHBROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
490: $oTemplate->set('s', 'MEDIABROWSER', $cfg["path"]["contenido_fullhtml"] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
491: $oTemplate->set('s', 'FRONTEND_PATH', $cfgClient[$client]["path"]["htmlpath"]);
492:
493:
494: $sGZIPScript = '';
495: if ($this->_bUseGZIP) {
496: $sGZIPScript = <<<JS
497: <script type="text/javascript">
498: tinyMCE_GZ.init({
499: plugins: '{$this->_aSettings["plugins"]}',
500: themes: '{$this->_aSettings["theme"]}',
501: languages: '{$this->_aSettings["language"]}',
502: disk_cache: true,
503: debug: false
504: });
505: </script>
506: JS;
507: }
508: $oTemplate->set('s', 'COMPRESSOR', $sGZIPScript);
509:
510:
511: $sConfig = '';
512:
513: foreach ($this->_aSettings as $sKey => $sValue) {
514: if (is_bool($sValue)) {
515: if ($sValue === true) {
516: $sValue = "true";
517: } else {
518: $sValue = "false";
519: }
520: }
521:
522: if ($sValue == "true" || $sValue == "false" || $sKey == "oninit" || $sKey == "onpageload" || $sKey == 'style_formats') {
523: $sConfig .= "'$sKey': " . $sValue;
524: } else {
525: $sConfig .= "'$sKey': '" . $sValue . "'";
526: }
527: $sConfig .= ",\n\t";
528: }
529:
530: $sConfig = substr($sConfig, 0, -3);
531: $oTemplate->set('s', 'CONFIG', $sConfig);
532:
533: $oTxtEditor = new cHTMLTextarea($this->_sEditorName, $this->_sEditorContent);
534: $oTxtEditor->setId($this->_sEditorName);
535:
536: $sBgColor = $this->_aSettings["contenido_background_color"];
537:
538: $oTxtEditor->setStyle("width: " . $this->_aSettings["width"] . "; height: " . $this->_aSettings["height"] . "; background-color: " . $sBgColor . ";");
539:
540: $sReturn = $oTemplate->generate($cfg['path']['all_wysiwyg'] . $this->_sEditor . "/tinymce.tpl.html", true);
541: $sReturn .= $oTxtEditor->render();
542:
543: return $sReturn;
544: }
545:
546: function getConfigInlineEdit() {
547: $sConfig = '';
548: $this->setToolbar('inline_edit');
549:
550: foreach ($this->_aSettings as $sKey => $sValue) {
551: if (is_bool($sValue)) {
552: if ($sValue === true) {
553: $sValue = "true";
554: } else {
555: $sValue = "false";
556: }
557: }
558:
559: if ($sValue == "true" || $sValue == "false" || $sKey == "oninit" || $sKey == "onpageload" || $sKey == 'style_formats') {
560: $sConfig .= "'$sKey': " . $sValue;
561: } else {
562: $sConfig .= "'$sKey': '" . $sValue . "'";
563: }
564: $sConfig .= ",\n\t";
565: }
566:
567: $sConfig = substr($sConfig, 0, -3);
568:
569: return $sConfig;
570: }
571:
572: function getConfigFullscreen() {
573: $sConfig = '';
574: $this->setToolbar('fullscreen');
575:
576: $sConfig .= "'theme_advanced_buttons1': '" . $this->_aSettings['theme_advanced_buttons1'] . "',\n";
577: $sConfig .= "'theme_advanced_buttons2': '" . $this->_aSettings['theme_advanced_buttons2'] . "',\n";
578: $sConfig .= "'theme_advanced_buttons3': '" . $this->_aSettings['theme_advanced_buttons3'] . "',\n";
579: $sConfig .= "'theme_advanced_toolbar_align': '" . $this->_aSettings['theme_advanced_toolbar_align'] . "',\n";
580: $sConfig .= "'plugins': '" . $this->_aSettings['plugins'] . "'\n";
581:
582: return $sConfig;
583: }
584: }
585:
586: ?>