Monday, August 7, 2006

Denisse Milani Look Alike

CSS Notes - Forcing properties formatting text in a rich text field on the Web

Nothing worse than a website where the cast of characters differ from one page to another. If it is possible to control a graphic for a site-oriented public, it is much more difficult or impossible to impose it for the important internal document databases. In defense of users, Lotus Notes preserves text properties in the copy / paste from the Office applications or from web pages.

Fortunately, the Domino Web engine conversion is not always clean. It still uses the "old" HTML tags, especially the \u0026lt;font> to define the font and size. To control the rendering of rich text field on the Web, there is enough to redefine the style of this tag. Thus we can for example add in the header of the web page:
  \u0026lt;style> 

font {font-family: tahoma, arial, helvetica, sans-serif;
font-size: 1em;}

\u0026lt; / style>

Whatever the font used and whatever its size defined in Notes, the field content will always appear in tahoma font size 1em. The user can cons by bold or underline the characters to add some effects to the content.

course we can also surround the rich text box of a div with a class defined to limit the scope of the effect in this field. We will then have the mask:
  \u0026lt;div class="mybody"> 

rich text field \u0026lt;/ div>
and for the definition of style:
  \u0026lt;style> 
# mybody are
{font-family: georgia, "Times New Roman ", Times Roman, serif;
font-size: 12px;}

\u0026lt;/ style>

0 comments:

Post a Comment