You are not logged in.
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
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