Toolbar in preview mode, accessing toolbar buttons

1 posts, 0 answers
  1. Ali
    Ali avatar
    7 posts
    Member since:
    Sep 2010

    Posted 03 Jan 2011 Link to this post

    I have some questions regarding toolbar in MOSSradEditor.
    1. When the MOSSRadEditor is the only control on the page, or for any other reason has the focus as soon as it is loaded the toolbar is always shown, even when the editor is set to have only the preview mode:

    editorPreview.EditModes = EditModes.Preview;

    Adding the following client-side script doesn't help either:

        <script type="text/javascript" language="javascript">
            function Editor_ClientLoad(editor, args) {

    What is your suggestion to solve this issue?

    2. I would like to make some toolbar buttons invisible as soon as the editor is selected, hence the toolbar is shown. I use the following client side code:
            function Editor_ClientLoad(editor, args) {
                editor.attachEventHandler("onmousedown", function(e) {
            var oTool = this.Editor.getToolByName("buttonName"); //get a reference to the custom tool
            if (oTool == null)
    After the first mouse click, toolbar buttons are not yet accessible, in other words oTool==null. After the second click it works fine.
    How can I solve this problem, Can you suggest a better way to get the same results?

    3. If there are two or more toolbars defined for a single editor, how can we get a reference to the toolbar causing the client side event "OnClientCommandExecuting" in the corresponding evand handler?

    I appreciate your reponse.
Back to Top