Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2010-06-10 05:28:57

barema
New member
Registered: 2010-06-10
Posts: 1

custom dropdown: how to handle select-events ?

Hi all,

I've managed to implement a custom dropdown menu item, but I don't know how to handle select-events.
(my intention is to use the dropdown to insert tags into the edited text (for mail-merge usage))
This is what I got so far: I manage to display the dropdown in the menu using the config-settings below

conf.registerDropdown({
   id: "my-test",
    options: { "alfa": "$resultA", "beta": "$resultB", "gamma": "$resultC" },
    tooltip: "select a custom field to insert into the text",
    action: function(v){alert(v);}
});

What I don't know is how to handle a select-event, which is triggered, since I get some output on each select event.  I have no idea what kind of object is returned and how to retrieve the underlying values in my option list.

All help is welcome !!

Regards,
Bart

Offline

#2 2010-06-10 06:04:47

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: custom dropdown: how to handle select-events ?

Have you looked first to see if a plugin can do this task for you already?

These plugins do this sort of thing...
InsertSnippet
InsertSnippet2

IF neither of those is suitable, you should look at the plugin CSS or DynamicCSS which will show you how to handle a drop-down so you can write your own plugin to do exactly what you need.


James Sleeman

Offline

Board footer

Powered by FluxBB