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).
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.
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.