You will not have font tags, and that's the wrong way to do those things. Consider that the contents can go in several different places/medias.
The right way:
User type text, formatting it with the editor.
Text is saved in a DB, or something, or even simply processed to be sent.
If the text is to be sent by e-mail, the application appends the outer <html> and <body> tags to it, including the basic styles definition (fonts for example).
For point 3, it means that the contents need to be prepared "by the application" "before outputting it". This is transparent to the end user.
For example, suppose the user typed the some text, and the following has been saved on the DB:
Before sending your e-mail, you simply expand the above HTML, including your preferred styles:
<html>
<head>
<style type="text/css>
body
{
/* Here you have your default styles */
}
</style>
</head>
<body>
<p>Some <strong>text</strong>.</p>
<p><em>More</em> text.</p>
</body>
</html>
Then, just send the above HTML, still having the original content intact, without the useless formatting stuff.
Re: Set Default Font and have it also in html source to be saved
I would suggest you injecting the contents inside a full HTML page with <body>, defining the styles for <body> with the font you want.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Set Default Font and have it also in html source to be saved
Re: Set Default Font and have it also in html source to be saved
The right way:
- User type text, formatting it with the editor.
- Text is saved in a DB, or something, or even simply processed to be sent.
- If the text is to be sent by e-mail, the application appends the outer <html> and <body> tags to it, including the basic styles definition (fonts for example).
For point 3, it means that the contents need to be prepared "by the application" "before outputting it". This is transparent to the end user.For example, suppose the user typed the some text, and the following has been saved on the DB:
Before sending your e-mail, you simply expand the above HTML, including your preferred styles:
<html> <head> <style type="text/css> body { /* Here you have your default styles */ } </style> </head> <body> <p>Some <strong>text</strong>.</p> <p><em>More</em> text.</p> </body> </html>Then, just send the above HTML, still having the original content intact, without the useless formatting stuff.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn