From dhoworth@mrc-lmb.cam.ac.uk Thu Jan 05 04:09:53 2006 Received: from ppsw-7.csi.cam.ac.uk ([131.111.8.137]) by shale.socialtext.net with esmtp (Exim 4.34) id 1EuTwG-0004og-Rr for wikiwyg-dev@wikiwyg.net; Thu, 05 Jan 2006 04:09:53 -0800 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from server1.mrc-lmb.cam.ac.uk ([131.111.85.23]:59260) by ppsw-7.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.137]:25) with esmtp id 1EuTwC-0003Le-Or (Exim 4.54) for wikiwyg-dev@wikiwyg.net (return-path ); Thu, 05 Jan 2006 12:09:48 +0000 Received: from cpepc210-3.lmb.internal ([10.14.0.2]) by server1.mrc-lmb.cam.ac.uk with esmtp (Exim 4.10) id 1EuTwC-0001fp-00 for wikiwyg-dev@wikiwyg.net; Thu, 05 Jan 2006 12:09:48 +0000 From: Dave Howorth To: wikiwyg-dev@wikiwyg.net Content-Type: text/plain Organization: Medical Research Council Centre for Protein Engineering Date: Thu, 05 Jan 2006 12:09:47 +0000 Message-Id: <1136462988.1989.127.camel@cpepc210-3.lmb.internal> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1 Content-Transfer-Encoding: 7bit Subject: [Wikiwyg-dev] multi-line
 bug
X-BeenThere: wikiwyg-dev@wikiwyg.net
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: dhoworth@mrc-lmb.cam.ac.uk
List-Id: wikiwyg-dev.wikiwyg.net
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Jan 2006 12:09:53 -0000

There's a bug to do with multi-line PRE sections that's noted on the
wikiwyg bugs page on www.kwiki.org (which seems to be down right now).

I got annoyed enough with it to fix it on my system. I'm not a
Javascript wiz so there's probably much better ways to do it but here's
my patch:

--- Wikitext-orig.js    2005-11-16 17:04:28.000000000 +0000
+++ Wikitext.js 2006-01-05 11:56:22.000000000 +0000
@@ -936,7 +937,15 @@
 }

 proto.handle_start_lines = function (element, markup) {
-    var text = element.firstChild.nodeValue;
+    var text;
+    if (element.nodeName.toLowerCase() == 'pre') {
+       text = element.innerHTML
+       text = text.replace(//g, '\n');  // 
becomes newline + text = text.replace(/<.*?>/g, ''); // discard other HTML tags + } + else { + text = element.firstChild.nodeValue; + } if (!text) return; this.assert_blank_line(); text = text.replace(/^/mg, markup[1]); BTW, as far as I can tell, indented text doesn't work properly either. Haven't looked at that. Cheers, Dave From dhoworth@mrc-lmb.cam.ac.uk Thu Jan 05 07:50:12 2006 Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]) by shale.socialtext.net with esmtp (Exim 4.34) id 1EuXNU-0005JP-67 for wikiwyg-dev@wikiwyg.net; Thu, 05 Jan 2006 07:50:12 -0800 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from server1.mrc-lmb.cam.ac.uk ([131.111.85.23]:34155) by ppsw-0.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.130]:25) with esmtp id 1EuXMp-0002EZ-1u (Exim 4.54) for wikiwyg-dev@wikiwyg.net (return-path ); Thu, 05 Jan 2006 15:49:31 +0000 Received: from cpepc210-3.lmb.internal ([10.14.0.2]) by server1.mrc-lmb.cam.ac.uk with esmtp (Exim 4.10) id 1EuXMp-0005Iy-00 for wikiwyg-dev@wikiwyg.net; Thu, 05 Jan 2006 15:49:31 +0000 Subject: Re: [Wikiwyg-dev] multi-line
 bug
From: Dave Howorth 
To: wikiwyg-dev@wikiwyg.net
In-Reply-To: <1136462988.1989.127.camel@cpepc210-3.lmb.internal>
References: <1136462988.1989.127.camel@cpepc210-3.lmb.internal>
Content-Type: text/plain
Organization: Medical Research Council Centre for Protein Engineering
Date: Thu, 05 Jan 2006 15:49:31 +0000
Message-Id: <1136476171.1989.143.camel@cpepc210-3.lmb.internal>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.1 
Content-Transfer-Encoding: 7bit
X-BeenThere: wikiwyg-dev@wikiwyg.net
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: dhoworth@mrc-lmb.cam.ac.uk
List-Id: wikiwyg-dev.wikiwyg.net
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 05 Jan 2006 15:50:12 -0000

On Thu, 2006-01-05 at 12:09 +0000, Dave Howorth wrote:
> There's a bug to do with multi-line PRE sections that's noted on the
> wikiwyg bugs page on www.kwiki.org (which seems to be down right now).
> 
> I got annoyed enough with it to fix it on my system. I'm not a
> Javascript wiz so there's probably much better ways to do it but here's
> my patch:

junk deleted!

That patch doesn't work when the preformatted text includes HTML
reserved characters :(  Here's another version:

--- Wikitext-orig.js    2005-11-16 17:04:28.000000000 +0000
+++ Wikitext.js 2006-01-05 15:14:27.000000000 +0000
@@ -936,7 +936,29 @@
 }

 proto.handle_start_lines = function (element, markup) {
-    var text = element.firstChild.nodeValue;
+    var text = ''
+    if (element.nodeName.toLowerCase() == 'pre') {
+        var child
+        for (child = element.firstChild; child ; child =
child.nextSibling) {
+           var name = child.nodeName
+           var value
+           if (name == '#text') {
+               value = child.nodeValue
+           }
+           else if (name.toLowerCase() == 'br') {
+               value = "\n"
+           }
+           else {
+             alert('BUG: node type "' + name + '" not expected')
+             return
+           }
+
+           text = text + value
+       }
+    }
+    else {
+       text = element.firstChild.nodeValue;
+    }
     if (!text) return;
     this.assert_blank_line();
     text = text.replace(/^/mg, markup[1]);

Cheers, Dave




From mchamber@adobe.com Tue Jan 17 14:23:57 2006
Received: from exprod6og3.obsmtp.com ([64.18.1.123])
	by shale.socialtext.net with smtp (Exim 4.34) id 1EyzF7-0005Zb-Av
	for wikiwyg-dev@wikiwyg.net; Tue, 17 Jan 2006 14:23:57 -0800
Received: from source ([192.150.20.142]) by exprod6ob3.obsmtp.com
	([64.18.5.12]) with SMTP; Tue, 17 Jan 2006 14:23:55 PST
Received: from inner-relay-1.corp.adobe.com ([153.32.1.51])
	by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id
	k0HMNpFX017415
	for ; Tue, 17 Jan 2006 14:23:53 -0800 (PST)
Received: from fe1.corp.adobe.com (fe1.corp.adobe.com [10.8.192.70])
	by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id
	k0HMNmI7028955
	for ; Tue, 17 Jan 2006 14:23:52 -0800 (PST)
Received: from namail4.corp.adobe.com ([10.8.192.68]) by fe1.corp.adobe.com
	with Microsoft SMTPSVC(6.0.3790.211); 
	Tue, 17 Jan 2006 14:25:38 -0800
Received: from [192.168.0.4] ([10.176.128.120]) by namail4.corp.adobe.com with
	Microsoft SMTPSVC(6.0.3790.211); Tue, 17 Jan 2006 14:25:37 -0800
Mime-Version: 1.0 (Apple Message framework v746.2)
Content-Transfer-Encoding: 7bit
Message-Id: <5D741F83-99F5-4FED-AA2C-A1CA89974C4D@adobe.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: wikiwyg-dev@wikiwyg.net
From: Mike Chambers 
Date: Tue, 17 Jan 2006 14:23:47 -0800
X-Mailer: Apple Mail (2.746.2)
X-OriginalArrivalTime: 17 Jan 2006 22:25:38.0018 (UTC)
	FILETIME=[F1211C20:01C61BB4]
Subject: [Wikiwyg-dev] IE Windows : Unspecified Error in Wysiwyg.js
X-BeenThere: wikiwyg-dev@wikiwyg.net
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: wikiwyg-dev.wikiwyg.net
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 17 Jan 2006 22:23:57 -0000

I am trying to get wikiwyg working with DokuWiki. However, I am  
running into an issue with IE and wikiwyg.

IE 6 is giving me an "Unspecified Error" when it encounters this  
function in Wysiwyg.js

---
proto.get_edit_document = function() {
     return this.edit_iframe.contentWindow.document;
}
---

Specifically, it is barfing on

this.edit_iframe.contentWindow

---
proto.get_edit_document = function() {
     alert(this);
     alert(this.edit_iframe);
     alert(this.edit_iframe.contentWindow); //barfs on this
     var d = this.edit_iframe.contentWindow.document;
     return d;
}
---

IE 6.0.2900.2180.xpsp_sp2_rtm.040803-2158

Didn't find much info online about this, but I did come across this:

http://www.oreillynet.com/pub/a/javascript/2002/02/08/iframe.html

------
Sadly, referencing the IFRAME's document object is no simple task,  
since IE5, IE5.5, IE6, and NS6 all provide different ways to access  
it. IE5, both on the Mac and PC, provides the simplest method:  
IFRAMEs in this browser show up in the document.frames array and have  
a document property. In IE5.5, IE6 and NS6, you can retrieve the  
IFRAME element object with document.getElementByID(), then, in NS6,  
use the object's contentDocument property, and in IE 5.5+, use the  
document property of the IFRAME object's contentWindow property.  
That's quite a mouthful, isn't it?
------

Is this a known issue? Has anyone else ran into this? Any known  
workarounds?

mike chambers