CustomAddon dropdown possible?

Last post 04-29-2009, 1:40 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  04-10-2009, 5:16 AM 50970

    CustomAddon dropdown possible?

    I've just started using the editor.
     
    Does anyone know if it is possible to create a dropdown that can POST back its selection programmably using CustomAddons with PHP?
    $editor->CustomAddons = ??
     
    I've looked at the button demo and how the dropdowns are done in the config files but I'm not sure where to start.
     
    I did try something like...
    $editor->CustomAddons = '<select name="menu" id="menu"><option>item1</option><option>item2</option></select>';
    ... and although this did put a menu on the toolbar it has a strange behavior.
     
    In Firefox 3.0.8 when you try to select an item in the menu it defaults back to the first item. If you open the menu, close it again then use the arrow keys you can get to the different items :S
  •  04-10-2009, 9:57 AM 50981 in reply to 50970

    Re: CustomAddon dropdown possible?

    UPDATE:
     
    I also tried mirroring what gets spat out in the source code for the editors built in css style dropdown...

     $editor->CustomAddons =
        "<br clear='both'/>
        <table class='CuteEditorGroupMenu' cellSpacing='0' cellPadding='0' border='0'>
        <tr><td class='CuteEditorGroupMenuCell'><nobr>
         <span
            class='CuteEditorDropDown'
            id='CE_Editor1_IDcssclass'
            Command='CssClass'
            onchange=\"CuteEditor_DropDownCommand(this,'CssClass')\"
            RichHideFirstItem='true'
            _IsRichDropDown='True'
            style='display:inline-block;width:70px;height:20px;'
        >
            <span val=''
                selected='True'
                html='Css Class'
                txt='Css Class'>
            </span>
        </span>"
        .
        "</nobr></td></tr></table>";
     
    ... which almost works but screws up the toolbar layout. If I take out the _IsRichDropDown='True' it behaves but is no longer a dropdown menu (It's just a box where the dropdown goes)
     
    Any ideas anyone?
  •  04-13-2009, 2:52 PM 51048 in reply to 50970

    Re: CustomAddon dropdown possible?

    Are you trying to achieve the following dropdown behaviour in the following example?
     
     
    Select the dropdown, the page postbacks and the stay the value selected.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-28-2009, 8:09 PM 51634 in reply to 51048

    Re: CustomAddon dropdown possible?

    Sort of. I want a dropdown menu like the toolbar choice but on the actual editor, like the CSS Class, Inline Style, Normal etc... dropdowns.
     
    I want to create something like the CSS Class menu but with PHP/CustomAddon ... is that possible?
  •  04-29-2009, 1:40 PM 51670 in reply to 51634

    Re: CustomAddon dropdown possible?

    gman,
     
    Yes, you can just create a dropdown menu and include it into cute editor toolbar. In the OnChange event of the dropdown menu, change window.location.href to meet your requirements.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML