Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

default font

0 views
Skip to first unread message

Magdalena Servente

unread,
Mar 25, 2002, 6:57:26 AM3/25/02
to
Hi, to all
I'm using the DHTML Edit control in VB to make a WYSIWYG editor and I found
out that the default font is Times New Roman. So when the user doesn't
change the font, the tag the edito puts is <FONT size=4>times 14</FONT>
(without font face). If the user chooses another font, lets say arial, the
font tag is <FONT face=Arial size=2>arial 10</FONT>
The problem I'm having is that when I open the page with an explorer whose
default font is not Times New Roman, the font comes out wrongly. Is there a
way to force the editor to put the font face tag?

I'd really appreciate your help
Regards,
Magdalena


Magdalena Servente

unread,
Apr 3, 2002, 5:46:53 AM4/3/02
to
OK, here's how I solved it.
Inmediately before calling savedocument, I alter the html code so that the
default font (Times new Roman) actually appears in the document. Like this:
DHTMLEdit.DOM.body.innerHTML = "<FONT FACE=" & Chr(34) & "Times New Roman"
& Chr(34) & ">" & _
DHTMLEdit.DOM.body.innerHTML & "</FONT>"

With this I wasn't able to change the default font, but I force it,
therefore if I open the html document with other applications, I see Times
New Roman and not the other app's default font

Does anyone have a better suggestion?

Regards,
Magdalena

"Magdalena Servente" <mser...@fusiondm.tv> escribió en el mensaje
news:uSXe7XB1BHA.2244@tkmsftngp07...

Doug D

unread,
Apr 4, 2002, 8:18:44 PM4/4/02
to
You could try...

DHTMLEdit.DOM.body.style.fontfamily = "Times New Roman"

Applying a FONT tag around the entire content does not consistently apply
font attributes to content within a table.

-Doug
www.ewebeditpro.com

"Magdalena Servente" <mser...@fusiondm.tv> wrote in message
news:OLYXE6x2BHA.956@tkmsftngp03...

Stev

unread,
Apr 5, 2002, 11:50:41 PM4/5/02
to
Maybe insert a style tag

EG:

val = DHTMLEdit.DocumentHTML
toChange = val.split("</HEAD>")
newCode = toChange.join("<STYLE> BODY{ font-family:Times Roman;}</STYLE></HEAD>")
DHTMLEdit.DocumentHTML = newCode

bit crude but it might help

Stev


"Magdalena Servente" <mser...@fusiondm.tv> wrote in message news:OLYXE6x2BHA.956@tkmsftngp03...

0 new messages