24 comments
Comment actions Permalink

Michael Damberger wrote:

<pre><b>abc</b>: def=<font color="red">xyz</font></pre>

-> says: font is not allowed here,
but it seems to be valid html.

if you have PRE tag that means that content is preformated, in in that
case you cannot have font tag in it. But in any case font tag is long
time depricated so use css to set this property...


lp
tomaz

0
Comment actions Permalink

Tomaz Cerar wrote:

Michael Damberger wrote:

>> abc: def=xyz >> >> -> says: font is not allowed here, >> but it seems to be valid html. >> >>]]>

if you have PRE tag that means that content is preformated, in in that
case you cannot have font tag in it.

Unfortunately it could but font is not from that, see w3
(http://www.w3.org/TR/html4/struct/text.html#edef-PRE) fragmentarily
quoted below:

9.3.4 Preformatted text: The PRE element

<!ENTITY % fontstyle
"TT | I | B | BIG | SMALL">

<!ENTITY % phrase "EM | STRONG | DFN | CODE |
SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >

<!ENTITY % special
"A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">

<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">

<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; |
%formctrl;">

<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">

<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
<!ATTLIST PRE
%attrs; -- %coreattrs, %i18n, %events --
>

Start tag: required, End tag: required

...

The PRE element tells visual user agents that the enclosed text is
"preformatted". When handling preformatted text, visual user agents:

  • May leave white space intact.

  • May render text with a fixed-pitch font.

  • May disable automatic word wrap.

  • Must not disable bidirectional processing.


Non-visual user agents are not required to respect extra white space in
the content of a PRE element.

For more information about SGML's specification of line breaks, please
consult the notes on line breaks in the appendix.

The DTD fragment above indicates which elements may not appear within a
PRE declaration. This is the same as in HTML 3.2, and is intended to
preserve constant line spacing and column alignment for text rendered in
a fixed pitch font. Authors are discouraged from altering this behavior
through style sheets.

But in any case font tag is long

time depricated so use css to set this property...


lp
tomaz



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

I certainly use style sheets - but:
in this case it was only a quickly created html document for technical documentation, in which I wanted to highlight some parts by red color. I'm using a wysiwyg editor for that purpose in which it is really much easier to just use the word-processor-like select -> apply red color, than to write a stylesheet by which parts of ]]> contents are rendered in red ;)

0
Comment actions Permalink

Michael Damberger wrote:

I certainly use style sheets - but:
in this case it was only a quickly created html document for technical documentation, in which I wanted to highlight some parts by red color. I'm using a wysiwyg editor for that purpose in which it is really much easier to just use the word-processor-like select -> apply red color, than to write a stylesheet by which parts of <pre> contents are rendered in red ;)

>
>
You don't need to write a separate stylesheet.
Instead of , use . And it works fine inside of

]]>
.

/Kreiger



Attachment(s):
signature.asc
0
Comment actions Permalink

that's right!
now tell me the wysiwyg editor that does it like that ;)

0
Comment actions Permalink

Michael Damberger wrote:

that's right!
now tell me the wysiwyg editor that does it like that ;)


Any relatively recent one should be able to do it, at least after being configured to.

/Kreiger



Attachment(s):
signature.asc
0
Comment actions Permalink

that's right!
now tell me the wysiwyg editor that does it like that ;)

I was hoping that a WYSIWYG in IntelliJ would be the solution - even if it
were only a XHTML WYSIWYG :).
For instance the WYSIWYG from Fabrique, but only with the standard XHTML
elements :) - and as a separate plug-in.

Of course, I know that I'm dreaming :).

Ahmed.

0
Comment actions Permalink

one concrete example of an editor that should be able to do it?

0
Comment actions Permalink

that's right!
now tell me the wysiwyg editor that does it like that ;)


I think Mozilla-based editors like Composer and Nvu will do it.

-Keith


0
Comment actions Permalink

Michael Damberger wrote:

one concrete example of an editor that should be able to do it?

>
>
Sorry, no. I usually edit source by hand or generate it.

/Kreiger



Attachment(s):
signature.asc
0
Comment actions Permalink

I think wysiwyg is really convenient - it is only required that the editor does not f*** up the html source. (btw. I think word-processor like editing can also be very convienent for xml content, e.g. docbook format)

Namo Web Edit produces font tags when you use the most convenient way to modify the color of a word (via toolbar button).
You can tell it to produce a span-style but it requires more than 5 clicks...

So, it would be interesting to know which editor is really
smart enough to be configurable to not produce font-tags and make this really convenient!

M

0
Comment actions Permalink

I just tried: netscape composer does it 100% right!

0
Comment actions Permalink

this is what it produced:

abc defxyz
]]>


... I'm no html expert, but I heard about "web safe" colors:
is it good practice to use the rgb color?


0
Comment actions Permalink

On Tue, 01 Mar 2005 21:45:43 +0300, Michael Damberger wrote:

I think wysiwyg is really convenient - it is only required that the editor
does not f*** up the html source. (btw. I think word-processor like
editing can also be very convienent for xml content, e.g. docbook format)


For DocBook you can't go wrong with XMLMind XXE - I was thinking of an
IntelliJ plugin some time ago, might take another look at it sometime.

0
Comment actions Permalink

ok, in netscape you can type the color "red" in the
color picker - hm, how convenient is this ?! ;)

0
Comment actions Permalink

I think "Web safe" was cool back when people had 256-color screens, and a
bunch of colors were taken up by the Mosaic or Netscape UI. I don't think
it matters anymore.

-Keith

this is what it produced:

<pre>abc <span >def</span>xyz <br></pre>

.. I'm no html expert, but I heard about "web safe" colors: is it good
practice to use the rgb color?




0
Comment actions Permalink

are you sure?

"Unless you work entirely in black and white, approximately half your general audience won't properly see the colors you select for your site"

from: Death of the web safe palette? http://webmonkey.wired.com/webmonkey/00/37/index2a_page2.html?tw=design


0
Comment actions Permalink

... but you're right: nobody uses 256bit color display, and 16bit dithering is not really a problem. especially for just marking some text in red

... btw. the colors that Netscape Composer shows in the color picker are the "web safe" colors anyway
(204 = CC)

0
Comment actions Permalink

ehm..could you find bit older article..by David Lehn and Hadley Stern 6 Sep 2000

0
Comment actions Permalink

thanks for the XMLMind tip.

for those who might be interested:
Mozilla/Netscape Composer is good in using instead of ]]> - but there is no way to apply a class to tag. the word css is not even in the help index.
and if you go to html source, it is not able to go to the part of the code that mathces the caret position.
Also it cannot follow #anchors within a document.

... so still looking for a better alternative.

0
Comment actions Permalink

Mozilla/Netscape Composer is good in using <span> instead of <font> -
but there is no way to apply a class to tag. the word css is not even
in the help index.


I'm using Nvu, which is based on Composer, but I assume it's the same in
Composer. Can't you right-click the tag name on the status bar, and see the
Classes submenu, and apply a class that way?


0
Comment actions Permalink

On Wed, 02 Mar 2005 at 19:42 GMT, Michael Damberger wrote:

Mozilla/Netscape Composer is good in using <span> instead of <font> -
but there is no way to apply a class to tag. the word css is not even in
the help index. and if you go to html source, it is not able to go to
the part of the code that mathces the caret position. Also it cannot
follow #anchors within a document.


You might want to look at NVU then - which is where all the funky CSS work
for the mozilla composer is going.

http://www.nvu.com/

0
Comment actions Permalink

Michael Damberger napisa³(a):

one concrete example of an editor that should be able to do it?

DreamWeaver MX.

0
Comment actions Permalink

thanks to all who pointed me to NVU - it's quite nice,
but when linking a stylesheet it always uses absolute path.
and it seems not to be possible to easily convert external
stylesheet to internal.

maybe in the next version... ;)

0

Please sign in to leave a comment.