@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
34 lines • 1.7 kB
JavaScript
/**
* 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 var DataAttribute;
(function (DataAttribute) {
DataAttribute["AddButtonInsertPosition"] = "data-kontent-add-button-insert-position";
DataAttribute["ElementCodename"] = "data-kontent-element-codename";
DataAttribute["ComponentId"] = "data-kontent-component-id";
DataAttribute["ItemId"] = "data-kontent-item-id";
DataAttribute["LanguageCodename"] = "data-kontent-language-codename";
DataAttribute["EnvironmentId"] = "data-kontent-environment-id";
})(DataAttribute || (DataAttribute = {}));
/**
* 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 var MetadataAttribute;
(function (MetadataAttribute) {
MetadataAttribute["AddButton"] = "data-kontent-add-button";
MetadataAttribute["AddButtonRenderPosition"] = "data-kontent-add-button-render-position";
MetadataAttribute["DisableFeatures"] = "data-kontent-disable-features";
})(MetadataAttribute || (MetadataAttribute = {}));
/**
* Valid values of the MetadataAttribute.DisableFeatures attribute.
* Those values can be used to disable certain features for the selected node.
*/
export var DisableableFeature;
(function (DisableableFeature) {
DisableableFeature["Highlight"] = "highlight";
})(DisableableFeature || (DisableableFeature = {}));
//# sourceMappingURL=attributes.js.map