javascript - TextAngular custom toolbar button onElementSelect not working for table/tr/td -


i have implemented custom button allows user add table editor, works fine. however, can't seem onelementselect fire when clicking in newly added table. goal when user clicks on table, popover displayed allow user edit number of columns/rows. now, i'm triggering alert.

taregistertool('inserttable', {       iconclass: 'fa fa-table',       tooltiptext: 'insert table',       onelementselect: {         element: 'td',         action: function(event, $element, editorscope){          alert('table clicked!');          // once here, add necessary code implement table editor       },       action: function($deferred){...          ...     });     taoptions.toolbar[1].push('inserttable'); 

i have tried setting element td, tr, tbody, , table, none of work. if set a or img, clicking on 1 of elements in editor fires alert.

i've added custom toolbar buttons inserting links , images , work fine using method. textangular not allow selection of table elements?

plunkr of i'm stuck: http://plnkr.co/edit/tm1dmv?p=preview

after digging, found following:

in textangularsetup.js file, around line 55, can add additional elements able create click events on.

.value('taselectableelements', ['a','img','td']) 

that's it!

plunkr updated working example: http://plnkr.co/edit/tm1dmv?p=preview


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -