How to add a font type in WYSIWYG editor

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/5/2009 8:31:59 AM
Gravatar
Total Posts 21
Silviuz

How to add a font type in WYSIWYG editor

Hi Everybody,
does anybody know how to add a font type in the WYSIWYG editor's drop down list??
Thanks a lot

5/5/2009 9:04:48 AM
Gravatar
Total Posts 18439

Re: How to add a font type in WYSIWYG editor

You can specify fonts by using a custom config file for FCKeditor, you can see from this setting in Web.config that it uses /ClientScript/mojofckconfig.js

<add key="FCKeditor:CustomConfigPath" value="~/ClientScript/mojofckconfig.js" />

You could copy and modify that file and then make it use your custom version by putting ths setting in user.config so it will override the setting frm Web.config.

However, if the fonts you specify are not installed on clioent machines it will not work. The ones currently in the list are generally available on most machines.

Also, my recommendation is to never use the font selector in the editor. In fact I'm thinking of removing that by default and make it a config setting if you want to enable it. The reason is, its contrary to the notion of having a skinable site to use hard coded font names. If you use those in your content then those fonts will be used no matter what skin is used. Next year you may make a new skin design and that font may look ugly in your new skin and now you have to fix it by editing all the content to remove that font. Its much better to use css classes so that the fonts are determined by the skin and not hard coded into your content. Same issue with the font size dropdown and font colors, I recommend don't use them at all, in the long run you will regret it. I think at one time I removed those dropdowns but they slipped back in again along the way. I plan to remove them by default in a future release because it encourages bad practices with your content.

Hope it helps,

Joe

5/5/2009 9:14:21 AM
Gravatar
Total Posts 21
Silviuz

Re: How to add a font type in WYSIWYG editor

I definitely agree with you.

Thanks a lot

You must sign in to post in the forums. This thread is closed to new posts.