Philippe Lhoste wrote:
Kein-Hong Man a écrit :
I wanted a bit nicer folding for exported HTML files of source code,
and I've hacked a fix using a Lua-based HTML exporter. The sample is
located at:
http://www.geocities.com/keinhong/SciTE_Classic_Eliza2.html
Collapsed folds are underlined now, and the click point changes from
"-" to "+" and vice-versa. I've tested it okay on Seamonkey 1.0.4 and
Opera 9, but the changing of text doesn't work for IE6. A dump of IE6
DOM elements for <span> doesn't show anything useful. My Javascript
knowledge is rudimentary... Does anyone have a portable method for the
click point text toggle?
I tested the HTML file (cleaned up of GeoCities garbage...) on Firefox
2.0 and Internet Explorer 6.0.2900 (WinXP Pro SP2), and it works fine...
No JS error, and works as expected.
An update. I've done a lot of reading. The "-" and "+" toggling
shouldn't have worked on IE, because IE does not implement
textContent yet. Checked IE7 too, it still uses innerText.
Some browsers use innerText, some use textContent, so I've
prepared updated samples at:
http://sl-exporters.luaforge.net/SciTE_Classic_Eliza2.html
http://sl-exporters.luaforge.net/SciTE_Classic_Eliza2_mono.html
Now, the "-" and "+" toggling should work for all recent browsers.
I'll test some more (on more language samples, then Knoppix,
Firefox, IE5.5 too) and then offer Neil a patch. Having
underlining makes folding a HTML document of source code much more
usable.
On implementation: Background colours in the CSS styles have been
changed, so that the normal background colour can be inherited. If
not, background colours are opaque and due to alignment and
drawing order, the underlining may be partly or fully obscured. In
Mozilla, underlining is messed up by the opaqueness of the
previous or the next line.
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest