Opened 13 years ago

Closed 9 years ago

#597 closed defect (fixed)

Action handler of self defined dropdowns

Reported by: wgallo@… Owned by: gogo
Priority: normal Milestone: 2.0
Component: Xinha Core Version:
Severity: normal Keywords: dropdown select
Cc:

Description

I have added a dropdown to the toolbar by doing something like

config.registerDropdown({
  id: "ab",
  options: {"A" : "0", "B" : "1"},
  action: function(v) { alert(v); } // event handler
});

Now in the htmlarea.js in the function _comboSelected, the event handler is called by

dropdown.action(this);

where this would be the editor object (?). Shouldn't this be changed to

dropdown.action(value);

or

dropdown.action(el, txt);

or something like that? If not, how can I access the selected dropdown from the editor object?

Change History (1)

comment:1 Changed 9 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

I suspect there was a way, but i forget. Anyway this request seems reasonable, I've modified the call to the dropdown.action() as (editor, value, element, text).

changeset:1204

Note: See TracTickets for help on using tickets.