Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorIndividual editor settings in fckconfig.jsIndividual editor settings in fckconfig.js
Previous
 
Next
New Post
8/3/2007 5:39 PM
 

Hello Folks:
I have a module that has an fckeditor in it. And i want to be able to restrict the user's interaction with that editor. For instance, I want to be able to restrict the user from doing a 'Ctrl+C' (copy) or 'Ctrl+V' (paste) in the editor box. And i know that in the fckconfig.js file there is a section where you can register/unregister those keystrokes. But i only want to be able to do this for this single editor, if i were to change the fckconfig, it would do so for ALL the fckeditors in my portal. This is just one example of a setting that i want to change that you are not able to do so by using the "Show custom editor options" of the control. Is this possible? how can i achieve this? would i have to have a separate entry in the web.config for this new editor?

Also I would like to be able to let users upload their pictures through the editor "FCKConfig.ImageUpload=true" but i want each user that logs in to be able to upload to their assigned areas for instance, if user1 logs in then when he uploads a picture he would upload it to the user1 in the web server and then when he browses for all pictures using fckeditor he would only be able to see the pictures under the user1 folder. Any suggestions? 

I would really appreciate some help with this as I am a little stuck. thanx guys!
~f

 
New Post
8/8/2007 2:43 PM
 

can someone please provide some input? thank-you

~f

 
New Post
8/13/2007 4:50 AM
 

Hi, i would like to submit to this thread: I'm also looking for a way to set options for users or groups - i my case it is a group specific upload directory. Is it possible and how?
thanks,
felix helix

 
New Post
8/13/2007 10:35 AM
 

Hi Felix:

Since it is so hard to get help in these forums nowadays I figured I post the answer to my/your question.
If you want to be able to set the file browsing and uploading path on the fly for each user or group you will have to use the Application("FCKeditor:UserFilesPath") variable for FCKeditor on the Page_Init event. You can also use the Session("FCKeditor:UserFilesPath"), as a matter of fact, that is what the fckeditor documentation suggests. However, with dotnetnuke i couldnt get it to work properly using the session variable so instead I used the "Application" call, i think that this is the equivalent of using the web.config except that you are doing it dynamically. Anyhow, below is an example of how I am doing it in my site, notice that I am just checking the user name for the current logged in user, I am not checking group memberships like you want:

        Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
            Try
                Dim userCtrlr As New UserController
                Dim user As UserInfo = userCtrlr.GetUser(PortalId, UserId)
                Application("FCKeditor:UserFilesPath") = Page.ResolveUrl("~/Portals/" & PortalId.ToString & "/Userfiles/FlyerImgs/" & user.Username & "/")
            Catch exc As Exception 'Module failed to load
                ProcessModuleLoadException(Me, exc)
            End Try
        End Sub

Make sure that you are using the "Page.ResolveUrl" otherwise the application will have problems converting the image path, and the image will not display properly.

Now, for my original question regarding changing fckconfig.js settings but only specific to the instance of the editor in a single module, there really isnt a way to do this. What i had to do was introduce the asp.net version of the fckeditor in my site as a new control with its own web.config. This way, the new settings do not affect the settings of all the other fckeditors in the site, and I have complete control of the new controls settings. I actually wanted to reall customize the control and had to change a few javascript files under the _source directory of fckeditor. For my purposes this seemed to work much better, I dont think I see how it could have worked out otherwise. Anyhow, I hope that helps someone.

 

 
New Post
8/14/2007 6:17 AM
 

Thanks a lot for your extensive response . I wasn't able to try it by now, but I'm sure it will work out fine :-)
Concerning your customization question: there exists the option to configure the FCKeditor per instance. If you look at the DNN HTML Module, you'll find a link below the editor that leads to the configuration. Again at the bottom you can set the range of the settings to "instance". This way it shouldn't affect other modules.
your's
felix

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorIndividual editor settings in fckconfig.jsIndividual editor settings in fckconfig.js


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out