You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adding html 5 data- attr for each item is not working after checking the source code I found bug which is already reported here. #712 , but still if I fixed plugin not adding data attr to each menu item...
so i did little changes to source code and add following snippets after line # 1183 // create contextMenu items
if (item.dataAttr) { $t.attr('data-'+Object.keys(item.dataAttr), Object.values(item.dataAttr)); }
by adding above snippets I can add data attr to menu items as following.
var items = { firstCommand: { name: "Copy", dataAttr: { menuTitle: "My custom title" } } }
I hope this help someone ,, or maybe will be add in new release of plugin
thanks
The text was updated successfully, but these errors were encountered:
adding html 5 data- attr for each item is not working after checking the source code I found bug which is already reported here. #712 , but still if I fixed plugin not adding data attr to each menu item...
so i did little changes to source code and add following snippets after line # 1183 // create contextMenu items
if (item.dataAttr) { $t.attr('data-'+Object.keys(item.dataAttr), Object.values(item.dataAttr)); }
by adding above snippets I can add data attr to menu items as following.
var items = { firstCommand: { name: "Copy", dataAttr: { menuTitle: "My custom title" } } }
I hope this help someone ,, or maybe will be add in new release of plugin
thanks
The text was updated successfully, but these errors were encountered: