# textera code unterschiedliche Darstellung?



## Shorty1968 (27. Juni 2012)

Hallo ich versuche den HotEditor zu Laufen zu bekommen,das sieht auch bis jetzt sehr gut aus ich habe nur noch ein problem mit der hoteditor.html und zwar steht darin ganz oben Folgender code:

```
<textarea style="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;height:1px" <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
```
Und der Editor sieht so aus,ich kann auch einen Text eingeben nur wenn ich ihn abenden will kommt immer *Der Text ist zu kurz*:


Wenn ich dann diesen code:

```
<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
```
Eintrage sieht es so aus und im oberen fenster ,wenn ich da einen Text eingebe kann ich ihn auch absenden:


Ich verstehe das verhalten des codes nicht und warum er Zwei Eingabe Fenster anzeigt?
Hier noch der Restliche Code aus der hoteditor.html,vielleicht liegt es ja auch daran:

```
<style type='text/css'>@import url(richedit/styles/office2007/style.css);</style>			
<script language="JavaScript" type="text/javascript" src="richedit/editor.js?version=4.2"></script>				
<script language="JavaScript" type="text/javascript">
	if(document.getElementById("message")){
		var mydoc=document.getElementById("message");
	}
	else if(document.getElementById("signature")){
		var mydoc=document.getElementById("signature");
		
	}
	var getdata = mydoc.value;
	getdata = convertSize(getdata,"1");
	
	Instantiate("max","editor", getdata , "100%", "300px");
	//For Vietnamese User. Edit file editor.js to enable vietnamese keyboard
	if(enable_vietnamese_keyboard==1){
		document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"richedit/avim.js\"><\/script>");
		var hoteditor_avim_method = hot_readCookie("hoteditor_avim_method");var him_auto_checked="";var him_telex_checked="";var him_vni_checked="";var him_viqr_checked="";var him_viqr2_checked="";var him_off_checked="";if(hoteditor_avim_method=="0"){him_auto_checked="checked";}else if(hoteditor_avim_method=="1"){him_telex_checked="checked";}else if(hoteditor_avim_method=="2"){him_vni_checked="checked";}else if(hoteditor_avim_method=="3"){him_viqr_checked="checked";}else if(hoteditor_avim_method=="4"){him_viqr2_checked="checked";}else if(hoteditor_avim_method=="-1"){him_off_checked="checked";}
		document.write("<div style='width:100%;text-align:center;font-family:Verdana;font-size:11px;'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src="+styles_folder_path+"/vietnamese_symbol.gif></div>");
	}
	function get_hoteditor_data(){
		if (HTML_ON == "no"){
			alert ("Please uncheck the HTML checkbox");
			return false;
		}
		setCodeOutput();
		var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
		//Make BBCode ouput compatible with phpbb
		var currentDomain=document.URL;
		currentDomain=currentDomain.replace("http://","");
		var infoDomain=currentDomain.split("/");
		var correctDomain="http://";
		for(var d=0;d < infoDomain.length; d++){
			if(d<infoDomain.length-1) correctDomain+=infoDomain[d]+"/";
		}
		bbcode_output=bbcode_output.replace(/\[IMG\]\.\//gi,"[IMG]"+correctDomain);
		bbcode_output=bbcode_output.replace(/\[(\/)quote\]/gi,"[$1quote]");
		bbcode_output = convertSize(bbcode_output,"0");
		mydoc.value = bbcode_output;
	}

	function convertSize(text,what){
		if(what=="1"){//phpBB size to Hoteditor size
			text=text.replace(/\[size=85\]/gi,"[SIZE=1]");
			text=text.replace(/\[size=100\]/gi,"[SIZE=2]");
			text=text.replace(/\[size=120\]/gi,"[SIZE=3]");
			text=text.replace(/\[size=130\]/gi,"[SIZE=4]");
			text=text.replace(/\[size=150\]/gi,"[SIZE=5]");
			text=text.replace(/\[size=170\]/gi,"[SIZE=6]");
			text=text.replace(/\[size=200\]/gi,"[SIZE=7]");
		}
		else{//Hoteditor size to phpBB size 
			text=text.replace(/\[size=1\]/gi,"[SIZE=85]");
			text=text.replace(/\[size=2\]/gi,"[SIZE=100]");
			text=text.replace(/\[size=3\]/gi,"[SIZE=120]");
			text=text.replace(/\[size=4\]/gi,"[SIZE=130]");
			text=text.replace(/\[size=5\]/gi,"[SIZE=150]");
			text=text.replace(/\[size=6\]/gi,"[SIZE=170]");
			text=text.replace(/\[size=7\]/gi,"[SIZE=200]");					
		}				
		return text;
	}						
</script>	
<script type="text/javascript">
// <![CDATA[
	var form_name = 'postform';
	var text_name = <!-- IF $SIG_EDIT -->'signature'<!-- ELSE -->'message'<!-- ENDIF -->;
	var load_draft = false;
	var upload = false;

	// Define the bbCode tags
	var bbcode = new Array();
	var bbtags = new Array('[ b ]','[ /b ]','[ i ]','[ /i ]','[ u ]','[ /u ]','[ quote ]','[ /quote ]','[ code ]','[ /code ]','[ list ]','[ /list ]','[ list= ]','[ /list ]','[ img ]','[ /img ]','[ url ]','[ /url ]','[ flash= ]', '[ /flash ]','',''<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
	var imageTag = false;

	// Helpline messages
	var help_line = {
		b: '{LA_BBCODE_B_HELP}',
		i: '{LA_BBCODE_I_HELP}',
		u: '{LA_BBCODE_U_HELP}',
		q: '{LA_BBCODE_Q_HELP}',
		c: '{LA_BBCODE_C_HELP}',
		l: '{LA_BBCODE_L_HELP}',
		o: '{LA_BBCODE_O_HELP}',
		p: '{LA_BBCODE_P_HELP}',
		w: '{LA_BBCODE_W_HELP}',
		a: '{LA_BBCODE_A_HELP}',
		s: '{LA_BBCODE_S_HELP}',
		f: '{LA_BBCODE_F_HELP}',
		y: '{LA_BBCODE_Y_HELP}',
		d: '{LA_BBCODE_D_HELP}'
		<!-- BEGIN custom_tags -->
			,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
		<!-- END custom_tags -->
	}

	var panels = new Array('options-panel', 'picupload-panel', 'attach-panel', 'poll-panel');
  var show_panel = 'options-panel';


// ]]>
</script>
<script type="text/javascript">
// <![CDATA[
	// Better Prompt 4 BBCodes / 4seven / 2010
	// img
	var img_wiz_1  = "{LA_IMG_WIZ_1}";
	var img_wiz_2  = "{LA_IMG_WIZ_2}";
	// url
	var url_wiz_1  = "{LA_URL_WIZ_1}";
	var url_wiz_2  = "{LA_URL_WIZ_2}";
	var url_wiz_3  = "{LA_URL_WIZ_3}";
	// flash
	var fla_wiz_1  = "{LA_FLA_WIZ_1}";
	var fla_wiz_2  = "{LA_FLA_WIZ_2}";
	var fla_wiz_3  = "{LA_FLA_WIZ_3}";
	var fla_wiz_4  = "{LA_FLA_WIZ_4}";
	// ok + cancel
	var bb_wiz_ok  = "{LA_BB_WIZ_OK}";
	var bb_wiz_ca  = "{LA_BB_WIZ_CA}";
	// Better Prompt 4 BBCodes / 4seven / 2010
// ]]>
</script>

<script type="text/javascript" src="jquery/jquery.alerts.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
```


----------

