hello, yes you can make any editor the default one, for example if you want to make tinyeditor the default XOOPS editor (for blocks and everything) do the following:
- edit the file formdhtmltextarea.php , you can find it in this path: /class/xoopsform/
look for this code (i think it's on line 74):
le="color: #000000"><?php var $htmlEditor = array();
and replace it by the following:
le="color: #000000"><?php var $htmlEditor = array('XoopsFormTinyeditorTextArea', '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php');
save the file and replace it by the existing one in your website.
- edit this file: blockform.php, you can find it on this path:
module/system/admin/blocksadmin/
look for the folowing code in it:
le="color: #000000"><?php $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70);
and replace it by this one:
le="color: #000000"><?php if ( is_readable(XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php")) { include_once(XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php"); $textarea = new XoopsFormTinyeditorTextArea(array('caption'=>_AM_CONTENT, 'name'=>'bcontent', 'value'=>$block['content'], 'width'=>'100%', 'height'=>'400px', 'xEditor'=>'1')); }else{ $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70); }
save the file and replace it by the existing one in your website and update the system module.
now if you need to make this editor also the default editor of all modules installed in your website , do the following:
- go to xoops_version.php and look for this code:
le="color: #000000"><?php array(_MI_NEWS_FORM_DHTML => 'dhtml', _MI_NEWS_FORM_COMPACT => 'textarea', _MI_NEWS_FORM_SPAW => 'spaw', _MI_NEWS_FORM_HTMLAREA => 'htmlarea', _MI_NEWS_FORM_KOIVI => 'koivi', _MI_NEWS_FORM_FCK => 'fck';
and replace it by the following:
le="color: #000000"><?php array(_MI_NEWS_FORM_DHTML => 'dhtml', _MI_NEWS_FORM_COMPACT => 'textarea', _MI_NEWS_FORM_SPAW => 'spaw', _MI_NEWS_FORM_HTMLAREA => 'htmlarea', _MI_NEWS_FORM_KOIVI => 'koivi', _MI_NEWS_FORM_FCK => 'fck', 'tinyeditor' => 'tinyeditor');
finally, edit include/functions.php
and look for:
le="color: #000000"><?php case "koivi": if(!$x22) { if ( is_readable(XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php")) { include_once(XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php"); $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, '100%', '400px', ''); } } else { $editor = new XoopsFormEditor($caption, "koivi", $editor_configs); } break;
and replace it by the following
le="color: #000000"><?php case "tinyeditor": if ( is_readable(XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/ formtinyeditortextarea.php")) { include_once(XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php"); $editor = new XoopsFormTinyeditorTextArea(array 'caption'=>$caption, 'name'=>$name, 'value'=>$value, 'width'=>'100%', 'height'=>'400px', 'xEditor'=>'1')); } break;
Please try this methode on your local host first or backup the files that you will change in your website.