I set the font-family in the jquery.jwysiwyg.js (line-# 497 where < body > is defined) and added a CSS …
$('#wysiwyg').wysiwyg({css : { fontFamily: 'Arial, Tahoma', fontSize : '12px', color : '#333333'}});
The textarea shows Arial as font-family but when I click the remove formatting button it turns to Times New Roman. Is there any way I can set a default font to prevent this? I don't want Times as a base font.
Because jwysiwyg
renders in an iframe
, the styles of the containing page will not render (as it is actually a separate HTML file) and so jwysiwyg
will default to the standard font for the browser, which is usually Times New Roman.
You can use an external stylesheet to counter this issue like so:
$('#wysiwyg').wysiwyg({
css: 'editor.css'
});
And within editor.css
you would put body { font-family: "Arial, Tahoma"; }
.