Use Lotus script to operate the Lotus Notes RTF domain

Source: Internet
Author: User

The Lotus Notes RTF domain is also very powerful. In addition to common text, it also supports images, tables, embedded objects, HTTP links, notes links, attachments, and many other types. This article describes how to use these classes to flexibly operate rich text fields.
Lotus script class related to rich text fields in notes

Lotus script classes related to the operations on rich text fields in notes include:

Notesrichtextnavigator: the navigator of rich text fields, used to access various elements in rich text fields;
Notesrichtextrange indicates a range of rich text fields, which can contain multiple elements;
Notesrichtextdoclink indicates the document link of Rich Text domain content;
Notesembeddedobject indicates an embedded object or file attachment;
Notesrichtextsection indicates a section in the rich text field;
Notesrichtexttable indicates a table in the rich text field;
Notesrichtextstyle indicates various attributes of rich text;
Notesrichtextparagraphstyle indicates the attributes of rich text paragraphs;
Notescolorobject indicates a color.

Program.

Notessession. createrichtextstyle: Creates a notesrichtextstyle object.
Notessession. createrichtextparagraphstyle: Creates a notesrichtextparagraphstyle object.
Notessession. createcolorobject: Creates a notescolorobject object.
Note that notesrichtextstyle, notesrichtextparagraphstyle, and notescolorobject objects cannot be created using new, because these three classes do not have the new () method and can only be created using notessession.

Notesrichtextitem. appendstyle: Insert a format object in the current position. The format after this position is used until another format is inserted.
Notesrichtextitem. appendparagraphstyle: insert a paragraph format object in the current position. This format is used for paragraphs after this position until another paragraph format is inserted.
Notesrichtextitem. beginsection: Insert a section in the rich text domain.
Notesrichtextitem. endsection: the end of the section. It must be paired with beginsection.
You can use various append methods to add various elements between the two methods. When inserting segments, the segments are always at the end of the rich text field. Note that you cannot create a section that contains the existing elements in the rich text domain. The Section created by using the beginsection method is always empty, and the section content must be added by the program.

Notesrichtextitem. createnavigator: Creates a Rich Text domain navigator object notesrichtextnavigator.
Only this method can be used to create a Rich Text domain navigator. There is no new method for notesrichtextnavigator. You can also obtain a notesrichtextnavigator object by using the notesrichtextrange. Navigator attribute.

The notesrichtextnavigator class is the most important class for flexible access to the content in rich text fields. through some of its methods, you can easily access elements in rich text fields.
The navigator object notesrichtextnavigator maintains a current location. Any get or find operation in the rich text domain may change this location. Navigation always occurs in the same type of elements. You can use the find and get methods to access the corresponding elements. After finding the required elements, you can use the get method to obtain the elements. The following table lists these methods.

Notesrichtextitem. begininsert: Change the insert position from the end of the rich text field to the start or end of the specified element.

Notesrichtextitem. endinsert: resets the insert position to the end of the Rich Text Field and needs to be paired with begininsert.

You can use various append methods to add various elements between the two methods. Let's take a look at the specific usage of begininsert:

Call notesrichtextitem. begininsert (element, [after])

Parameter description

Element: It can be vertex, notesrichtextdoclink, notesrichtextnavigator, notesrichtextrange, notesrichtextsection, or notesrichtexttable, indicating the location of the object. If it is vertex, it indicates the current location of the notesrichtextnavig.

After: an optional Boolean parameter. "True" indicates that the insert position is at the end of the element. "false" indicates that the insert position starts with the element.

The Lotus Notes RTF domain is also very powerful. In addition to common text, it also supports images, tables, embedded objects, HTTP links, notes links, attachments, and many other types. This article describes how to use these classes to flexibly operate rich text fields.
Lotus script class related to rich text fields in notes

Lotus script classes related to the operations on rich text fields in notes include:

Notesrichtextnavigator: the navigator of rich text fields, used to access various elements in rich text fields;
Notesrichtextrange indicates a range of rich text fields, which can contain multiple elements;
Notesrichtextdoclink indicates the document link of Rich Text domain content;
Notesembeddedobject indicates an embedded object or file attachment;
Notesrichtextsection indicates a section in the rich text field;
Notesrichtexttable indicates a table in the rich text field;
Notesrichtextstyle indicates various attributes of rich text;
Notesrichtextparagraphstyle indicates the attributes of rich text paragraphs;
Notescolorobject indicates a color.

Some methods used in the program.

Notessession. createrichtextstyle: Creates a notesrichtextstyle object.
Notessession. createrichtextparagraphstyle: Creates a notesrichtextparagraphstyle object.
Notessession. createcolorobject: Creates a notescolorobject object.
Note that notesrichtextstyle, notesrichtextparagraphstyle, and notescolorobject objects cannot be created using new, because these three classes do not have the new () method and can only be created using notessession.

Notesrichtextitem. appendstyle: Insert a format object in the current position. The format after this position is used until another format is inserted.
Notesrichtextitem. appendparagraphstyle: insert a paragraph format object in the current position. This format is used for paragraphs after this position until another paragraph format is inserted.
Notesrichtextitem. beginsection: Insert a section in the rich text domain.
Notesrichtextitem. endsection: the end of the section. It must be paired with beginsection.
You can use various append methods to add various elements between the two methods. When inserting segments, the segments are always at the end of the rich text field. Note that you cannot create a section that contains the existing elements in the rich text domain. The Section created by using the beginsection method is always empty, and the section content must be added by the program.

Notesrichtextitem. createnavigator: Creates a Rich Text domain navigator object notesrichtextnavigator.
Only this method can be used to create a Rich Text domain navigator. There is no new method for notesrichtextnavigator. You can also obtain a notesrichtextnavigator object by using the notesrichtextrange. Navigator attribute.

The notesrichtextnavigator class is the most important class for flexible access to the content in rich text fields. through some of its methods, you can easily access elements in rich text fields.
The navigator object notesrichtextnavigator maintains a current location. Any get or find operation in the rich text domain may change this location. Navigation always occurs in the same type of elements. You can use the find and get methods to access the corresponding elements. After finding the required elements, you can use the get method to obtain the elements. The following table lists these methods.

Notesrichtextitem. begininsert: Change the insert position from the end of the rich text field to the start or end of the specified element.

Notesrichtextitem. endinsert: resets the insert position to the end of the Rich Text Field and needs to be paired with begininsert.

You can use various append methods to add various elements between the two methods. Let's take a look at the specific usage of begininsert:

Call notesrichtextitem. begininsert (element, [after])

Parameter description

Element: It can be vertex, notesrichtextdoclink, notesrichtextnavigator, notesrichtextrange, notesrichtextsection, or notesrichtexttable, indicating the location of the object. If it is vertex, it indicates the current location of the notesrichtextnavig.

After: an optional Boolean parameter. "True" indicates that the insert position is at the end of the element. "false" indicates that the insert position starts with the element.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.