@kontent-ai/smart-link
Version:
Kontent.ai Smart Link SDK allowing to automatically inject [smart links](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview#a-using-smart-links) to Kontent.ai according to manually specified [HTML data attri
31 lines (30 loc) • 1.27 kB
TypeScript
/**
* Data-attributes are used to get some Kontent related data from DOM.
* Data from data-attributes is used to generate smart links or iframe messages to Kontent.
* However, this data can also be used in rendering (e.g. HTML elements with element codename attribute
* have highlights).
*/
export declare enum DataAttribute {
AddButtonInsertPosition = "data-kontent-add-button-insert-position",
ElementCodename = "data-kontent-element-codename",
ComponentId = "data-kontent-component-id",
ItemId = "data-kontent-item-id",
LanguageCodename = "data-kontent-language-codename",
EnvironmentId = "data-kontent-environment-id"
}
/**
* Metadata-attributes are used to get some metadata about some of the SDK features.
* Metadata is used for SDK inner logic (such as rendering, event handling, etc.).
*/
export declare enum MetadataAttribute {
AddButton = "data-kontent-add-button",
AddButtonRenderPosition = "data-kontent-add-button-render-position",
DisableFeatures = "data-kontent-disable-features"
}
/**
* Valid values of the MetadataAttribute.DisableFeatures attribute.
* Those values can be used to disable certain features for the selected node.
*/
export declare enum DisableableFeature {
Highlight = "highlight"
}