Portal Engine
Version 3.x > Portal Engine > Customize FCKeditor View modes: 
User avatar
Member
Member
dranium - 2/11/2009 11:16:42 AM
   
Customize FCKeditor
Can anyone recommend a way to customize the FCKeditor toolbar by user role? I want everyone that is part of the CMS Editors role can only add bold, align text and add a pictures. Someone from the approval role has access to everything on the toolbar. Is this possible to do? I am currently working on the trial version 3.1a.

Thank you.

User avatar
Member
Member
Elijah - 2/15/2009 10:21:12 AM
   
RE:Customize FCKeditor
Without digging into it, it seems like it would be possible. It would require modifying some of the CMS Desk code (or possibly the FCK editor .net control itself) but with the way Kentico is built, I daresay anything is possible.

Since the CMS offers up all sorts of info in context during the processing of pages, it seems like you'd be able to pull that info out of the currentuserinfo object and then manipulate the FCKEditor's toolbar property as the control loads. Sorry this is vague, but like I said it would take some digging to get specific.

Hope this helps!
Elijah

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/18/2009 7:41:49 AM
   
RE:Customize FCKeditor
Hi,

In the editable region web part properties is one property for setting the toolbar set. so, in the code behind of the web part, you can add an IF statement which will check the current user and will decide which tool bar set will be displayed to the user.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
pcastillo-cadenaglobal - 2/18/2009 10:25:49 AM
   
RE:Customize FCKeditor
Hi Juraj,

What webpart I need to modify to complete this goal?

Regards,

Pablo

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/19/2009 1:29:57 AM
   
RE:Customize FCKeditor
Hi,

I mentioned it in my first sentence: "In the editable region web part...". This web part is placed in the Text category. Also, this will effect the Page tab and the documents with some editable region on it.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
srizzetto-microgate - 4/7/2009 4:21:50 AM
   
RE:Customize FCKeditor
Juraj,

I use aspx template mode so in my templates I use the <cms:EditableRegion> control not the webpart.

I put in my templates this lines and it works perfectly:

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (CMSContext.CurrentUser.IsInRole("CMSTranslator", CMSContext.CurrentSiteName))
CMSEditableRegion2.HtmlAreaToolbar = "Translator";
}
}

What I will ask is if this lines affected the performance of the public site (for the overhead in the cmsdesk I don't care...) every time the template is read...

Thanks
Sandro

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/8/2009 3:02:46 AM
   
RE:Customize FCKeditor
Hi,

The performance impact won't be significant, but I think that it will be better to place this code directly to the editable region web part. Good practice is to modify the standard web part according to this description - http://devnet.kentico.com/docs/devguide/modifying_the_design_of_standa.htm.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
srizzetto-microgate - 4/8/2009 3:22:38 AM
   
RE:Customize FCKeditor
Hi Juras,

as I said I use in my template a usercontrol dragged from my toolbar that come from CMS.Controls.DLL

<cms:CMSEditableRegion ID="CMSEditableRegion2" runat="server" RegionTitle="Content"
RegionType="HtmlEditor" DialogHeight="500" BackColor="White" />

In this case, I don't think to have the source code of those controls, or ??

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/8/2009 8:49:20 AM
   
RE:Customize FCKeditor
Hi,

You are right, sorry I have overlooked it. But you can still use the editable region as a web part from CMSWebParts/Text folder.

Best Regards,
Juraj Ondrus