aspnetcore-js-devexpress-dot-richedit-d94d16bb.md
Contains DOCVARIABLE field data.
export class DocumentVariableData
The CalculateDocumentVariableAsync event allows you to calculate results of all DOCVARIABLE fields in a document. The event’s data parameter returns an array of the DocumentVariableData objects that contain DOCVARIABLE field data.
richEdit.events.calculateDocumentVariableAsync.addHandler(function(s, e) {
e.data.forEach(function(data) {
data.callback('Result Of ' + data.variableName);
});
});
Gets field arguments.
args: string[]
| Type | Description |
|---|---|
| string[] |
An array of field arguments.
|
A DOCVARIABLE field has the following syntax: { DOCVARIABLE "variable name" "argument1" "argument2"... }. Use the args property to get access to an array of field arguments.
Set the result of the DOCVARIABLE field.
callback: (value: null | string | DocumentProcessorBase, keepLastParagraph?: boolean) => void
| Type | Description |
|---|---|
| (value: string | DocumentProcessorBase, keepLastParagraph?: boolean) => void |
The value parameter specifies the field result.
The keepLastParagraph parameter specifies whether the last paragraph mark of the inserted document is kept in the resulting document.
|
Call the callback function to set the result of the DOCVARIABLE field. The result value can be one of the following types:
null - the field has no result;The keepLastParagraph property is in effect when the value property is set to an instance of the DocumentProcessorBase class. Set the keepLastParagraph property to true to add the last paragraph mark of the inserted document to the resulting document.
Gets the text buffer interval that contains the field.
readonly fieldInterval: Interval
| Type | Description |
|---|---|
| Interval |
The text buffer interval.
|
Gets the name of the document variable.
variableName: string
| Type | Description |
|---|---|
| string |
The name of the document variable.
|
A DOCVARIABLE field has the following syntax: { DOCVARIABLE "variable name" "argument1" "argument2"... }. Use the variableName property to identify a document variable by its name.