|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Could you please tell me how to address an HTML editor toolbaritem from code behind? I want to set some items as visible=false under certain conditions.
Also, is there as way to disable or preset the link Target? I always want to use _blank for that, and don't want users to change it.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Please see here for how to customize toolbar items: http://www.essentialobjects.com/doc/1/editor/customize_toolbar.aspxPlease keep in mind that we do not distinguish code behind and aspx because they are just just two different ways to do the same thing. For example, "Visible="False"" in aspx is equivalent to "obj.Visible=False" in code behind. In order to change the link target, you will need to customize the Insert/Edit link dialog. See here for more details: http://doc.essentialobjects.com/library/1/editor/customize_dialog.aspxYou can take the default InsertEditLink dialog, then modify it to give the target textbox a default value, and also hide it (so that user won't be able to change it). Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Once again, I appreciate for your prompt reply. I have customized the link dialog box and that works great. Thanks.
But I still cannot figure out how to hide/unhide the HTMLmode ToolBarItem under different conditions. I only want users in a specific membership role to be able to see that button. I've been trying to figure out how to drill down and get the visible property of that ToolBarItem using the editor's findcontrol, but can't seem top grab it.
What's the best way to do this?
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We don't really tell you "what's the best way to do" something because that not only that varies on personal preference, but also requires us to look into and understand your specific scenarios. As a general rule, we do NOT analyze your particular business scenario and advise on implementation. We only tell you what our product does. You will then need to figure out the rest. The reason is if we do that, then everybody will just started to hand over their task on hand to us and ask us how to do it. We cannot afford to do that, so we have to say no up front about this kind of questions.
In term of ToolBarItems, I believe the previous link we posted covered both of the two available methods for you to customize toolbar items: "Choosing ToolBar Set" and "Choosing ToolBar Items". So that's all there is on our side.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/27/2010 Posts: 69
|
Not sure what I asked that engendered such a condescending response, but let me try again:
I have an editor control named featureEditor. I'm trying to turn off the visible property on the HTMLmode ToolBarItem in the page load event based on the membership role of the user. I thought I might do that by drilling down to the toolbar, something like featureEditor.findcontrol("Toolbar1"). But it returns Nothing.
Is it possible to address the toolbaritem like that and, if so, can you suggest a way to do that?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe our previous reply has already explained it very clearly to you. We will NOT take what you wanted to do, analyze it, devise a best plan and help you on implementing it. We don’t do that because if we consider that part of your job and we cannot afford to do that for our customers. If we do it for one customer, then we will have to do it for every customers and people will just started to ask us how to implement their projects all day, or simply say “this is what we wanted to do, please give me a sample code”. It will end up with us doing their work for them. That’s why we do not do that.
In your case, if you believe FindControl should work but it doesn’t, then that would be a great question and we can start from there. You can tell us exactly how you call FindControl and we can look into it and tell you why it doesn’t work; or how to make it work. In another word, your question has to be very specifically and directly related to us. If you ask a general “how to do this” type of question, we will always just telling you “this is what we think you may need from us” and stop there. We will not try to analyze your problem and help you figure out what’s the best route to reach from our end to your end. You have to do that part yourself.
Hope this explains it better. Thanks for understanding.
Thanks!
|
|