You are not logged in.
Pages: 1
Hi all:
I have assigned to migrate Xhina to pLog (a very famous open source mutli-blogging platform).
It is really easy to migrate xinha, just drop in replace and rewrite the initial script, but there some weird behavior, therefore I come here to conform:
In htmlarea 3.0 I can use the row="20" to control the hight of textarea, but this seems not wowks with xinha.
I already test it under IE and FF. In IE, it works, the height will follow the "row" attribute. But in firefox, it won't (always show me toolbar with 2 row only...)
It seems I have no way to control the height in firefox unless I use config.height
BTW, when I change the source/html mode, the height will also resized .... Is this right?
Mark
Last edited by markwu (2005-07-19 13:59:27)
Offline
Sorry, my firefox version is 1.0.4 (Traditional Chinese)
And, the Xinha is in the most update nightly build (2005/07/19)
Mark
Offline
One more question.
When I change to text mode under fire fox, I only get one line of source code .... everything go into one line ..
Can I keep the text mode format as IE does?
Mark
Offline
In htmlarea 3.0 I can use the row="20" to control the hight of textarea, but this seems not wowks with xinha.
Fixed in revision 278 (http://xinha.python-hosting.com/ticket/404) thanks.
James Sleeman
Offline
Hi James:
Great jobs!!
Thanks for the fix. it works very well under firefox now. But when I change the wydiwyg mode to text mode, the textarea in IE still resize again and again, is it the normal behavior?
BTW, I did some tweak for firefox source formating, it you think the tweak okay, maybe you can include them into the next build. Here comes the patch:
---[Find in htmlarea.js]---
switch (mode) {
case "textmode":
{
var html = this.outwardHtml(this.getHTML());
---[Replace With] ---
switch (mode) {
case "textmode":
{
if (!HTMLArea.is_gecko) {
var html = this.outwardHtml(this.getHTML());
} else {
var html = insertCRLF(this.getHTML());
}
---[ Add the function to end of file before the last two lines ]---
// -------------------------------------------------------------
// PLOG HTMLAREA TWEAK
// Added by: Mark Wu
// Original by: einSTein
// Date: 2005/02/05
// Purpose: Add a CR/LF after some HTML Tag, maintain the source format
// Come From: http://www.htmlarea.com/forum/htmlArea_3_(beta)_C4/htmlArea_v3.0_-_Bug_Reports_%26_Fixes_F25/Bug_Reports_%26_Fixes_-_Forum_Rules_%2AREAD_THIS%2A_P37586/gforum.cgi?post=22136#22136
// -------------------------------------------------------------
function insertCRLF( txt ) {
txt = txt.replace(/<br \/>([^\n])/g,"<br \/>\n$1");
txt = txt.replace(/<tr>([^\n])/g,"<tr>\n$1");
txt = txt.replace(/<\/h1>([^\n])/g,"<\/h1>\n$1");
txt = txt.replace(/<\/h2>([^\n])/g,"<\/h2>\n$1");
txt = txt.replace(/<\/h3>([^\n])/g,"<\/h3>\n$1");
txt = txt.replace(/<\/h4>([^\n])/g,"<\/h4>\n$1");
txt = txt.replace(/<\/h5>([^\n])/g,"<\/h5>\n$1");
txt = txt.replace(/<\/h6>([^\n])/g,"<\/h6>\n$1");
txt = txt.replace(/<\/tr>([^\n])/g,"<\/tr>\n$1");
txt = txt.replace(/<td>([^\n])/g,"<td>\n$1");
txt = txt.replace(/<\/td>([^\n])/g,"<\/td>\n$1");
txt = txt.replace(/<\/li>([^\n])/g,"<\/li>\n$1");
txt = txt.replace(/<\/p>([^\n])/g,"<\/p>\n$1");
txt = txt.replace(/<p \/>([^\n])/g,"<p \/>\n$1");
return txt;
};
This is what I did in pLog v1.0, hope this help. The source format in firefox can keep a "readable" situation.
Regards, Mark
Last edited by markwu (2005-07-20 00:43:24)
Offline
After the testing, I think I know what is the problem of textarea height in IE. It seems IE will change the textarea height to (textarea height+toobar height+status bar height) when we change to text mode. If I change to html mode, it will change the height to original textarea height again ..
But, firefox always follow the same height.
Is it a bug or normal behavior? How do I make them the same in IE and FireFox?
Thanks your help!
Mark
Last edited by markwu (2005-07-21 00:01:13)
Offline
Pages: 1