Custom "Properties" button

Last post 08-13-2012, 4:30 AM by cutechat. 6 replies.
Sort Posts: Previous Next
  •  06-26-2012, 1:19 PM 74019

    Custom "Properties" button

    I am trying to add a custom button to my toolbar which, when clicked, will open the Properties dialog for the element currently having focus ... but I am at a loss at how to do that. The current Properties dialog is buried too deep for my liking, so I want a more accessible button in the toolbar.
     
    Any help would be appreciated.
  •  06-27-2012, 7:32 AM 74024 in reply to 74019

    Re: Custom "Properties" button

    Hi GalaGalaxia,
     
    For now has not provide the api to open the properties dialog. So I think can not achieve it with your custom button. Sorry for your inconvenience.
     
    Regards,
     
    Ken 
  •  06-27-2012, 2:18 PM 74028 in reply to 74024

    Re: Custom "Properties" button

    Well, I know the properties dialog uses Tag.php with a parameter for which tag we are editing (... /Dialogs/Tag.php?Tag=TD ...). Opening the URL directly, obviously doesn't work, as it doesn't know which element is being edited, or the calling window.
     
    There are two JavaScript error messages in the console that provide a hint:
    Dialog_TagHead.js needs a parameter "arg"
    Dialog_Tag_Td.js (in this case, presumably a different JS file if a different tag is being referenced) needs parameter "element".
     
    For "arg", it gets its values from:
    var arg=Window_FindDialogArguments(window);
     
    The function Window_FindDialogArguments is defined in Dialog_TagHead.js
     
    So, yes ... I know there's no API for this, but I am well proficient with JavaScript to code things, if I just knew what, if anything, needs to be called, and with what parameter.
  •  06-28-2012, 7:43 PM 74038 in reply to 74028

    Re: Custom "Properties" button

    Certainly there must be a way to accomplish this. I mean, if I click the Cell properties button when in a table cell, the properties dialog pops up. Same goes for all the various properties dialogs that are accessed directly (and dynamically) from within the "Tag" sub menu, or the DOM Tag Tree at the bottom of the editor.
     
    So, I know it can be done ... I just don't have the parameter, and with the code being minified, it's a bit difficult to follow. But I know it can be done, if someone were just willing to tell me how ...
  •  07-06-2012, 3:42 AM 74088 in reply to 74038

    Re: Custom "Properties" button

    Just checking in, since this is still unsolved, and since I know there has to be a way to accomplish the task I am looking for.
  •  08-01-2012, 12:11 PM 74331 in reply to 74088

    Re: Custom "Properties" button

    Any ideas?
  •  08-13-2012, 4:30 AM 74412 in reply to 74331

    Re: Custom "Properties" button

    Hi,
     
    In the tag dialog , the parameters are these stuffs :
     
    var arg=Window_FindDialogArguments(window);
    var editor=arg.editor;
    var editwin=arg.window;
    var editdoc=arg.document;
    var element=arg.element;
     
    Regards,
    Terry
     
View as RSS news feed in XML