|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
The article by Mitchell Harper on building an html editor is great.
Is it possible to change the default font that is used in the rich text window? I have tried applying a style to it either through the id, like this: #iView {font-family: Verdana, sans-serif; font-size: 12px;} or through the local style tag like this: <iframe id="iView" style="width: 415px; height:205px; font-family: Verdana;"> and these are not working. I don't want to add a font tag to the actual text, I just want it to appear in Verdana in the window. Any ideas? Thanks, Sheri |
|
#2
|
|||
|
|||
|
this works for me
iView.document.body.style.fontFamily = "Courier" iView.document.body.style.fontSize = "10pt" iView.document.body.bgColor = '#FFFFCC'; iView.document.body.text = '#000000'; |
|
#3
|
|||
|
|||
|
the default font is controled by windows defaults in your prefrences.
|
|
#4
|
|||
|
|||
|
Thanks for the speedy responses!
Alazan, can you tell me where you put that block of code in the doc? I have tried it in several different places and it doesn't seem to have an effect. Ben, I see that it is controlled by the IE preferences. Does this mean that I cannot programatically override it on the user's system? Sheri |
|
#5
|
|||
|
|||
|
Sorry I forgot a couple of lines
iView.document.body.style.fontFamily = "Courier" iView.document.body.style.fontSize = "10pt" iView.document.body.bgColor = ""; iView.document.body.text = '#000000'; iText = iView.document.body.innerText; iView.document.body.innerHTML = iText; |
|
#6
|
|||
|
|||
|
Hey .. yea
Alazan is right ...
![]()
__________________
Rajeev |
|
#7
|
|||
|
|||
|
thanks!
Yep, I got this working yesterday! Thanks so much Alazan!
Sheri |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > WYSIWYG editor and default font |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|