Interface IMetadataHandler
Handler for performing simple operations with text metadata.
Package: @aurigma/design-atoms-text
Methods
createMetadata(properties)
Creates metadata by properties.
Declaration
createMetadata(properties: IMetadataProperty[]): IMetadata;
Parameters
Type | Name | Description |
---|---|---|
IMetadataProperty[] | properties |
metadata properties. |
Returns
Type | Description |
---|---|
IMetadata |
deleteMetadata(index)
Removes metadata by index.
Declaration
deleteMetadata(index: number): void;
Parameters
Type | Name | Description |
---|---|---|
number | index |
paragraph index. |
Returns
Type | Description |
---|---|
void |
getMetadata(index)
Returns metadata by index.
Declaration
getMetadata(index: number): IMetadata;
Parameters
Type | Name | Description |
---|---|---|
number | index |
paragraph index. |
Returns
Type | Description |
---|---|
IMetadata |
isMetadataExists(index)
Checks for the presence of metadata.
Declaration
isMetadataExists(index: number): boolean;
Parameters
Type | Name | Description |
---|---|---|
number | index |
paragraph index. |
Returns
Type | Description |
---|---|
boolean |
setMetadata(index, metadata)
Sets metadata by index.
Declaration
setMetadata(index: number, metadata: IMetadata): void;
Parameters
Type | Name | Description |
---|---|---|
number | index |
paragraph index. |
IMetadata | metadata |
metadata. |
Returns
Type | Description |
---|---|
void |