Index: trunk/phpgwapi/inc/class.html.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.html.inc.php	(revision 5281)
+++ trunk/phpgwapi/inc/class.html.inc.php	(revision 5334)
@@ -214,148 +214,4 @@
 	{
 		return "<textarea name=\"$name\" $options>".$this->htmlspecialchars($value)."</textarea>\n";
-	}
-
-	/*!
-	@function htmlarea_avalible
-	@author ralfbecker
-	@abstract Checks if HTMLarea (or an other richtext editor) is availible for the used browser
-	*/
-	function htmlarea_availible()
-	{
-		switch($this->user_agent)
-		{
-			case 'msie':
-			return $this->ua_version >= 5.5;
-			case 'mozilla':
-			return $this->ua_version >= 1.3;
-			default:
-			return False;
-		}
-	}
-
-	/**
-	 * creates a textarea inputfield for the htmlarea js-widget (returns the necessary html and js)
-	 *
-	 * Please note: it need to be called before the call to phpgw_header() !!!
-	 * @author ralfbecker
-	 * @param $name string name and id of the input-field
-	 * @param $content string of the htmlarea (will be run through htmlspecialchars !!!), default ''
-	 * @param $style string inline styles, eg. dimension of textarea element
-	 * @param $base_href string set a base href to get relative image-pathes working
-	 * @param $plugins string plugins to load seperated by comma's, eg 'TableOperations,ContextMenu'
-	 * (htmlarea breaks when a plugin calls a nonexisiting lang file)
-	 * @return the necessary html for the textarea
-	 */
-	function htmlarea($name,$content='',$style='',$base_href='',$plugins='')
-	{
-		if (!$style) $style = 'width:100%; min-width:500px; height:300px;';
-		// check if htmlarea is availible for the browser and use a textarea if not
-		if (!$this->htmlarea_availible())
-		{
-			return $this->textarea($name,$content,'style="'.$style.'"');
-		}
-		if (!$plugins) $plugins = 'ContextMenu,TableOperations,SpellChecker';
-
-		if (!is_object($GLOBALS['phpgw']->js))
-		{
-			$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
-		}
-		if (!strstr($GLOBALS['phpgw_info']['flags']['java_script'],'htmlarea'))
-		{
-			$GLOBALS['phpgw']->js->validate_file('htmlarea','htmlarea');
-			$GLOBALS['phpgw']->js->validate_file('htmlarea','dialog');
-			$lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
-			if ($lang == 'en')	// other lang-files are utf-8 only and incomplete (crashes htmlarea as of 3.0beta)
-			{
-				$GLOBALS['phpgw']->js->validate_file('htmlarea',"lang/$lang");
-			}
-			else
-			{
-				$GLOBALS['phpgw_info']['flags']['java_script'] .=
-					'<script type="text/javascript" src="'.ereg_replace('[?&]*click_history=[0-9a-f]*','',
-					$GLOBALS['phpgw']->link('/phpgwapi/inc/htmlarea-lang.php',array('lang'=>$lang))).'"></script>'."\n";
-			}
-
-			$GLOBALS['phpgw_info']['flags']['java_script_thirst'] .=
-				'<style type="text/css">@import url(' . $this->phpgwapi_js_url . '/htmlarea/htmlarea.css);</style>
-<script type="text/javascript">
-
-_editor_url = "'."$this->phpgwapi_js_url/htmlarea/".'";
-//	var htmlareaConfig = new HTMLArea.Config();
-//  htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';
-</script>\n";
-
-			// set a base href to get relative image-pathes working
-			if ($base_href && $this->user_agent != 'msie')	// HTMLarea does not work in IE with base href set !!!
-			{
-				$GLOBALS['phpgw_info']['flags']['java_script_thirst'] .= '<base href="'.
-					($base_href[0] != '/' && substr($base_href,0,4) != 'http' ? $GLOBALS['phpgw_info']['server']['webserver_url'].'/' : '').
-					$base_href.'" />'."\n";
-			}
-
-
-			if (!empty($plugins)) 
-			{
-				foreach(explode(',',$plugins) as $plg_name)
-				{
-					$plg_name = trim($plg_name);
-					$plg_dir = PHPGW_SERVER_ROOT.'/phpgwapi/js/htmlarea/plugins/'.$plg_name;
-					if (!@is_dir($plg_dir) || !@file_exists($plg_lang_script="$plg_dir/lang/lang.php") && !@file_exists($plg_lang_file="$plg_dir/lang/$lang.js"))
-					{
-						//echo "$plg_dir or $plg_lang_file not found !!!";
-						continue;	// else htmlarea fails with js errors
-					}
-					$script_name = strtolower(preg_replace('/([A-Z][a-z]+)([A-Z][a-z]+)/','\\1-\\2',$plg_name));
-					$GLOBALS['phpgw']->js->validate_file('htmlarea',"plugins/$plg_name/$script_name");
-					if ($lang == 'en' || !@file_exists($plg_lang_script))	// other lang-files are utf-8 only and incomplete (crashes htmlarea as of 3.0beta)
-					{
-						$GLOBALS['phpgw']->js->validate_file('htmlarea',"plugins/$plg_name/lang/$lang");
-					}
-					else
-					{
-						$GLOBALS['phpgw_info']['flags']['java_script'] .=
-							'<script type="text/javascript" src="'.ereg_replace('[?&]*click_history=[0-9a-f]*','',
-							$GLOBALS['phpgw']->link("/phpgwapi/js/htmlarea/plugins/$plg_name/lang/lang.php",array('lang'=>$lang))).'"></script>'."\n";
-					}
-					//$load_plugin_string .= 'HTMLArea.loadPlugin("'.$plg_name.'");'."\n";
-					$register_plugin_string .= 'ret_editor = editor.registerPlugin("'.$plg_name.'");'."\n";
-				}
-			}
-
-			$GLOBALS['phpgw_info']['flags']['java_script'] .=
-'<script type="text/javascript">
-
-/** Replacement for the replace-helperfunction to make it possible to include plugins. */
-HTMLArea.replace = function(id, config)
-{
-	var ta = HTMLArea.getElementById("textarea", id);
-
-	if(ta)
-	{
-		editor = new HTMLArea(ta, config);
-		'.$register_plugin_string.'
-		ret_editor = editor.generate();
-		return ret_editor;
-	}
-	else
-	{
-		return null;
-	}
-};
-
-'.$load_plugin_string.'
-
-var htmlareaConfig = new HTMLArea.Config();
-htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';";
-
-			$GLOBALS['phpgw_info']['flags']['java_script'] .="</script>\n";
-		}
-		$id = str_replace(array('[',']'),array('_',''),$name);	// no brakets in the id allowed by js
-
-		$GLOBALS['phpgw']->js->set_onload("HTMLArea.replace('$id',htmlareaConfig);");
-
-		if (!empty($style)) $style = " style=\"$style\"";
-
-		return "<textarea name=\"$name\" id=\"$id\"$style>".$this->htmlspecialchars($content)."</textarea>\n";
 	}
 
Index: trunk/phpgwapi/inc/htmlarea-lang.php
===================================================================
--- trunk/phpgwapi/inc/htmlarea-lang.php	(revision 2)
+++ 	(revision )
@@ -1,91 +1,0 @@
-<?php
-/**************************************************************************\
-* eGroupWare - API htmlarea translations (according to lang in user prefs) *
-* http://www.eGroupWare.org                                                *
-* Modified by Ralf Becker <RalfBecker@outdoor-training.de>                 *
-* This file is derived from htmlareas's lang/en.js file                    *
-* --------------------------------------------                             *
-*  This program is free software; you can redistribute it and/or modify it *
-*  under the terms of the GNU General Public License as published by the   *
-*  Free Software Foundation; either version 2 of the License, or (at your  *
-*  option) any later version.                                              *
-\**************************************************************************/
-
-
-$GLOBALS['phpgw_info']['flags'] = Array(
-	'currentapp'  => 'home',		// can't be phpgwapi, nor htmlarea (no own directory)
-	'noheader'    => True,
-	'nonavbar'    => True,
-	'noappheader' => True,
-	'noappfooter' => True,
-	'nofooter'    => True,
-	'nocachecontrol' => True			// allow cacheing
-);
-
-include('../../header.inc.php');
-header('Content-type: text/javascript; charset='.$GLOBALS['phpgw']->translation->charset());
-$GLOBALS['phpgw']->translation->add_app('htmlarea');
-
-// I18N constants
-
-// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
-// Author: Mihai Bazon, <mishoo@infoiasi.ro>
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-?>
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "<?php echo $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; ?>",
-
-	tooltips: {
-		bold:           "<?php echo lang('Bold'); ?>",
-		italic:         "<?php echo lang('Italic'); ?>",
-		underline:      "<?php echo lang('Underline'); ?>",
-		strikethrough:  "<?php echo lang('Strikethrough'); ?>",
-		subscript:      "<?php echo lang('Subscript'); ?>",
-		superscript:    "<?php echo lang('Superscript'); ?>",
-		justifyleft:    "<?php echo lang('Justify Left'); ?>",
-		justifycenter:  "<?php echo lang('Justify Center'); ?>",
-		justifyright:   "<?php echo lang('Justify Right'); ?>",
-		justifyfull:    "<?php echo lang('Justify Full'); ?>",
-		insertorderedlist:    "<?php echo lang('Ordered List'); ?>",
-		insertunorderedlist:  "<?php echo lang('Bulleted List'); ?>",
-		outdent:        "<?php echo lang('Decrease Indent'); ?>",
-		indent:         "<?php echo lang('Increase Indent'); ?>",
-		forecolor:      "<?php echo lang('Font Color'); ?>",
-		hilitecolor:    "<?php echo lang('Background Color'); ?>",
-		inserthorizontalrule: "<?php echo lang('Horizontal Rule'); ?>",
-		createlink:     "<?php echo lang('Insert Web Link'); ?>",
-		insertimage:    "<?php echo lang('Insert Image'); ?>",
-		inserttable:    "<?php echo lang('Insert Table'); ?>",
-		htmlmode:       "<?php echo lang('Toggle HTML Source'); ?>",
-		popupeditor:    "<?php echo lang('Enlarge Editor'); ?>",
-		about:          "<?php echo lang('About this editor'); ?>",
-		showhelp:       "<?php echo lang('Help using editor'); ?>",
-		textindicator:  "<?php echo lang('Current style'); ?>",
-		undo:           "<?php echo lang('Undoes your last action'); ?>",
-		redo:           "<?php echo lang('Redoes your last action'); ?>",
-		cut:            "<?php echo lang('Cut selection'); ?>",
-		copy:           "<?php echo lang('Copy selection'); ?>",
-		paste:          "<?php echo lang('Paste from clipboard'); ?>"
-	},
-
-	buttons: {
-		"ok":           "<?php echo lang('OK'); ?>",
-		"cancel":       "<?php echo lang('Cancel'); ?>"
-	},
-
-	msg: {
-		"Path":         "<?php echo lang('Path'); ?>",
-		"TEXT_MODE":    "<?php echo lang('You are in TEXT MODE.  Use the [<>] button to switch back to WYSIWIG.'); ?>"
-	}
-};
