CS Nuggets

This blog is for addons, bugs, fixes, and issues pertaining to Community Server.

CS: TinyMCE Menus, Justification and More!

Does the TinyMCE editor get you down?  You you feel unpoopular?  Whoops, thats a different issue.  The current issue at hand is that the default user controls seem to have left out the ability to justify text even though the editor and CS both support it.  Click here for a list of all the buttons/controls that TinyMCE supports.  What we are going to do here is add the missing justification buttons to the "TinyMCE Enhanced" editor:

File: CommunityServerWeb(20)/Themes/default/Skins/Skin-Editor-Enhanced.ascx:

Find the line:

<TMCE:TinyMCEOption runat="server" Name="theme_advanced_buttons2" Value="'bold,italic,underline,strikethrough,separator,indent,outdent,separator,bullist,numlist,separator,link,unlink,image,contentselector,smiley'" />

and insert:

,separator,justifyleft,justifycenter,justifyright,justifyfull

after the word 'strikethrough'.

Believe it or not, you're done.  Go ahead and try it.  If you want, add more buttons/controls that TinyMCE supports.  If you want to add these buttons to the "TinyMCE Standard" editor as well, do the following:

File: CommunityServerWeb(20)/Themes/default/Skins/Skin-Editor-Standard.ascx:

Find the line:

<TMCE:TinyMCEOption runat="server" Name="theme_advanced_buttons1_add" Value="'iespell'" />

and replace it with:

<TMCE:TinyMCEOption runat="server" Name="theme_advanced_buttons1" Value="'bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,indent,outdent,separator,bullist,numlist,separator,link,unlink,image,contentselector,smiley,separator,cut,copy,paste,pasteword,separator,code,iespell'" />

You might be asking, "Why did we replace the line here instead of inserting the missing text?"  The answer is that the control that Telligent wrote is hard coded with a basic set of buttons to which they were just adding the 'iespell' button.  So, we had to completely replace that basic list of buttons with the full list of buttons that we want to see.

I believe that the editor supports up to 4 or 5 menu lines, so go at it.  Not everything may function properly as some of the functions require custom code to be written for your site.  But you can try the different buttons, see what works, and decide what you want to provide.

Leave a Comment

(required) 

(required) 

(optional)

(required)