Closed karlitaviky811 closed 1 year ago
How can I add options to the button href? I need to place a dropdown with options (which are urls), but I can't find the way
I got this piece of code, but it doesn't work for me:
editor.getSelected().getTrait('href').set('options', [ { value: 'page1.html', name: 'Page 1' }, ... ])
https://grapesjs.com/docs/modules/Traits.html
How can I add options to the button href? I need to place a dropdown with options (which are urls), but I can't find the way
I got this piece of code, but it doesn't work for me:
editor.getSelected().getTrait('href').set('options', [ { value: 'page1.html', name: 'Page 1' }, ... ])