metadata of field

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the metadata of <fieldChunk> to <string>
Associationsfield
Summary

The metadata property of a field chunk specifies additional information stored with the field chunk but not visible to the user.

Introduced5.5
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
string

A string of text.

Example
set the metadata of word 6 of field 1 to "extra information hidden from the user"
get the metadata of char 1 to 100 of field 1
set the metadata of line 3 field "description" to "extra information"
put "ben is 5 years old" into field 1
set the metadata of word 1 of field 1 to "noun"
repeat with x = 1 to the number of words of field 1
   if the metadata of word x of field 1 is "noun" then 
      put toUpper(word x of field 1) into word x of field 1
   end if
end repeat
RelatedProperty: styledText, flagged
Description

Use the metadata property to store additional information in a field that is not visible to a user. Metadata can be specified for any field chunk; char, word and line as well as ranges (e.g. word 2 to 5).

The ability to add metadata at the paragraph level was added in version 6.0. Like metadata at the char level, you can now 'set the metadata of line ... of ...' and it will be attached to the paragraph, a level above the char properties. This means if you want to set the metadata on the char level for a whole line you must do 'set the metadata of char 1 to -1 of line .. of ...', rather than just 'of line'.

Tagstext processing