PermaLink Using CSS to over ride a Rich Text Field font12/22/2005 09:13 PM
Domino Development
When a Notes document is opened or read in a web browser, Domino automatically translates all font names, colors, sizes, etc. used in a Rich Text Field. So, if a Rich Text Field contains text that uses Arial font, Domino serves the following to the user's browser:

<font face="Arial">On February 5, 2006 Detroit will host Super Bowl XL. A number of events are planned leading up to the game starting the week of January 30 that will bring visitors from around Michigan and from out of state to Southeastern Michigan. Branches are asked to carefully consider appropriate cash levels to accommodate increased demand on branch serviced ATMs or bankcard cash advances. If your branch is in the downtown Detroit area or near local hotels or transportation centers, please take this demand into consideration when placing cash orders during the weeks of January 23 & 30.</font>

I tried adding the typical stylesheets to over ride the font tag served by Domino, like applying a font-family to the </body>, <p> and <td> tags. Didn't work. I even looked through the series of articles Scott Good wrote for the Lotus Advisor a while back. Nothing in there, either.

Then it hit me: I just need to override the <font> tag. No problem.
Comments :v

1. Stephan H. Wissel01/18/2006 10:19:18 PM
Homepage: http://www.wissel.net


Overwriting the font tag is a nice prank you can play with web designer that haven't upgraded to CSS. Overwrite it with different sub selectors (in FF even attributes would work) and let them figure out what happend...
stw




2. Sergey Redko04/14/2007 05:37:11 AM


Just put the following code in OnLoad section of your form and you CSS will work:

var oFONTs = document.getElementsByTagName('Font');
var oTmp;
if(oFONTs) {
for(var i=0;i<oFONTs.length;i++) {
var oTmp = oFONTs;
oTmp.removeAttribute("size");
}
};




Credits
NuTechs Powered by Domino
Search
Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
Lotus Domino ND6 RSS News Feed RSS Comments Feed Podcast Feed Geo URL netcraft RSS Validator Lotus Geek Chris. A. Brandlehner Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere