This can be done in only three steps :
1) add directory xinha in /manager/media containing Xinha distribution
2) modify file /manager/actions/dynamic/mutate_settings.dynamic.action.php :
line 520 added :
<option value="3" <?php echo $which_editor==3 ? "selected='selected'" : "";?>>Xinha</option>
3) modify /manager/actions/dynamic/mutate_content.dynamic.action.php this way :
<!-- /tinyMCE --> <?php
} elseif($which_editor==3) { ?>
<!-- xinha -->
<script type="text/javascript">
_editor_url = 'media/xinha/';
_editor_lang = "en";
</script>
<script type="text/javascript" src="media/xinha/htmlarea.js"></script>
<script type="text/javascript">
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
xinha_init = xinha_init ? xinha_init : function()
{
// configure plugins used by xinha
xinha_plugins = xinha_plugins ? xinha_plugins :
[
// 'CSS',
// 'DynamicCSS',
// 'FullPage',
'FullScreen',
'CharacterMap',
'ContextMenu',
'ListType',
// 'Stylist',
// 'TableOperations',
// 'InsertAnchor',
// 'FindReplace',
// 'DoubleClick',
// 'CharCounter',
// 'InsertWords',
// 'Abbreviation',
// 'LangMarks',
// 'Equation',
// 'InsertSmiley',
'EditTag'
];
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
// concerned textarea is 'ta'
xinha_editors = xinha_editors ? xinha_editors :
[
'ta'
];
xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
HTMLArea.startEditors(xinha_editors);
}
window.onload = xinha_init;
</script>
<div style="width:100%"><textarea id="ta" name="ta" style="width:100%; height: 400px;" onChange="documentDirty=true;"><?php echo htmlspecialchars($content['content']); ?></textarea> </div>
<?php }
} else {
...
Simple and really worthy...
François Lemarchand
balno@users.sourceforge.net











