Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Copy as ANSI (CSS)

Copy as ANSI (CSS)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Thu 06 Mar 2003 08:09 PM (UTC)

Amended on Thu 06 Mar 2003 10:48 PM (UTC) by Shadowfyr

Message
It occures to me that one major flaw in the existing 'Copy as HTML' feature it the inability for it to capture the background colors. My suggestion would be to either provide a setting that can be switched on in the general settings like - 'Use CSS when copying as HTML' or add that as a seperate copy option. Though having it as a general setting would be better.

Basically, instead of using a mess of <font color=...> ... </font> stuff, you instead use:

<span style="color: #00cc00; background: #00000"> ... </span>

This would preserve the correct color information for all lines and also should work on all but the really old browsers that lack CSS support. I doubt there are that many browsers that don't support this still in use.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 06 Mar 2003 10:44 PM (UTC)
Message
I didn't know you could do that. I presume you mean "copy as HTML", not "copy as ANSI". I have added it as suggestion 489.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #2 on Thu 06 Mar 2003 11:00 PM (UTC)

Amended on Thu 06 Mar 2003 11:09 PM (UTC) by Shadowfyr

Message
Yeah. Fixed that in my post. lol

I didn't know about it until recently either. Been fiddling with some page design issues and though CSS might solve a few issues. Unfortunately not, since my problem is best solved by a nice database, which geocities neither provides nor allows.

Hmm. Looking at the docs.. It appears that it may not work unless the <head></head> section of the resulting page also contains:

<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

since this is a requirement for inline styles. Kind of like having to declare <script language="javascript" type="text/javascript"> every place. Some browser may simply assume that you really intended to use javascript if you leave it off and automatically have it work, while others (and especially editors) will get really grabby and insist that you have to have it. ;)

Just tried it under Opera 6.05 and it worked without the META tag, so I assume Netscape and the new Opera 7 will both handle it correctly. It also works in a stripped down IE core based browser I have called Netsight, so odds are IE won't complain if the META tag is missing either. ;)
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 05 Apr 2003 10:50 PM (UTC)
Message
I have implemented this in 3.35. Since HTML browsers should ignore unknown tags I haven't bothered about an option - it will just do it.

However, for efficiency it will only use the <span> technique if the background differs from the default background, so in many cases it won't appear at all.

My tests in IE seem to show that the meta tag isn't necessary, and in any case MUSHclient doesn't produce the <head> tag (assuming you might want more than one example from your MUD on one page), so it is up to you whether you put it there or not.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,446 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.