JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › smart-editor onToobarItemClick event › Reply To: smart-editor onToobarItemClick event
January 24, 2023 at 11:44 am
#104285
jqwidgetsdev
Participant
Hi Svetoslav,
Ok, I see what you are doing, the event is of course firing now.
My example was indeed simple text, but what if the element value is HTML? Which element method should I then be using?
{
name: "settings",
width: "auto",
template: (element) => {
console.log(element);
element.<strong>innerHTML</strong> = <code><smart-button><i class='fa fa-cog' aria-hidden='true' title='Settings'></i></smart-button></code>;
element.addEventListener("click", () => {
console.log("click");
});
},
},
Thanks.