Ali
Ali

Reputation: 283

How to add Css classes in TinyMCE editor Styles drop down through coding

I want to load some custom css files classes in TinyMCE editor's styles dropdown, how one can do that specially through ASP.NET? is there any feature available from which i can pass on the path of my css files which are on a specific path at runtime? and TinyMCE editor load its classes in its Styles dropdown menu?

Upvotes: 1

Views: 2915

Answers (1)

John
John

Reputation: 404

While I am not familiar with ASP myself. I have done something similar using PHP in the past.

Use ASP to load the css file you want, in the head of your html

<link rel="stylesheet" type="text/css" href="<?php echo $pathtocss; ?>/tinymce.css" />

Then use the theme_advanced_styles option to the classes you want to use. http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/theme_advanced_styles

Hope this sets you in the right direction

Upvotes: 1

Related Questions