kontent-ai / smart-link

Kontent.ai Smart Link SDK can be used to automatically inject smart links to Kontent.ai according to manually specified HTML data attributes on your website. It also lets you connect your website with Web Spotlight (for faster editing and preview of your content).
MIT License
9 stars 4 forks source link

Add helper methods for creating attributes #151

Open pokornyd opened 7 months ago

pokornyd commented 7 months ago

Motivation

Manually adding element attributes can be rather repetitive, especially for add buttons, where multiple attributes need to be specified. This could be mitigated to some extent by including helper methods in the SDK.

Proposed solution

Add a set of helper methods which will create the required attributes for each available smartlink button based on user-provided values. See example implementation in our sample app source code.