Skip to main content
All docs
V26.1
  • IFieldsSettings Interface

    Declares field settings.

    Declaration

    export interface IFieldsSettings

    Properties

    allowedHyperlinkUriSchemes Property

    Specifies allowed URI schemes.

    Declaration

    allowedHyperlinkUriSchemes?: string[]

    Property Value

    Type Description
    string[]

    An array of allowed URI schemes.

    createHyperlinkTooltip Property

    Allows you to implement a custom tooltip for a hyperlink.

    Declaration

    createHyperlinkTooltip?: (hyperlinkTooltip: string, hint: string) => string

    Property Value

    Type Description
    (hyperlinkTooltip: string, hint: string) => string

    A function that specifies the tooltip text. The hyperlinkTooltip parameter contains a hyperlink's tooltip text. The hint parameter contains the tooltip hint (default value: \n Ctrl + Click to follow link)

    Remarks

    const options = DevExpress.RichEdit.createOptions();
    options.readOnly = true;
    options.fields.openHyperlinkOnClick = true;
    options.fields.createHyperlinkTooltip = function(hyperlinkTooltip, hint) {
      return (hyperlinkTooltip + "\nClick to follow link")
    };
    

    defaultDateFormat Property

    Specifies the format of the DATE field added by a UI command.

    Declaration

    defaultDateFormat?: string

    Property Value

    Type Description
    string

    The date format.

    Remarks

    Users can select the Mail Merge | Create Field | DATE command to insert the DATE field.

    Use the defaultDateFormat property to specify the default format for the inserted field.

    options.fields.defaultDateFormat = "dddd, MMMM dd, yyyy";
    options.fields.defaultTimeFormat = "'Current time is ' h:mm am/pm";
    

    RichEdit - Default Date and Time Format

    defaultTimeFormat Property

    Specifies the format of the TIME field added by a UI command.

    Declaration

    defaultTimeFormat?: string

    Property Value

    Type Description
    string

    The time format.

    Remarks

    Users can select the Mail Merge | Create Field | TIME command to insert the TIME field.

    Use the defaultTimeFormat property to specify the default format for the inserted field.

    options.fields.defaultDateFormat = "dddd, MMMM dd, yyyy";
    options.fields.defaultTimeFormat = "'Current time is ' h:mm am/pm";
    

    RichEdit - Default Date and Time Format

    keepHyperlinkResultForInvalidReference Property

    Specifies whether to delete the result of a hyperlink whose target location is not specified.

    Declaration

    keepHyperlinkResultForInvalidReference?: boolean

    Property Value

    Type Description
    boolean

    true to keep results of all hyperlinks; false to delete the result of a hyperlink whose target location is not specified.

    Remarks

    The Code part of a hyperlink field has the following syntax: { HYPERLINK "location" }. The location property specifies which bookmark, URL, or e-mail address this hyperlink refers to.

    The Rich Text Editor deletes the Result part of a hyperlink whose location property is empty. Set the keepHyperlinkResultForInvalidReference property to true to keep results of all hyperlinks.

    const options = DevExpress.RichEdit.createOptions();
    options.fields.keepHyperlinkResultForInvalidReference = true;
    // ...
    var richContainer = document.getElementById("rich-container");
    const richEdit = DevExpress.RichEdit.create(richContainer, options);
    

    openHyperlinkOnClick Property

    Specifies whether a hyperlink can be opened on a click.

    Declaration

    openHyperlinkOnClick?: boolean

    Property Value

    Type Description
    boolean

    true to open a hyperlink on a click, false to open a hyperlink on a click while pressing the CTRL key.

    Remarks

    const options = DevExpress.RichEdit.createOptions();
    options.readOnly = true;
    options.fields.openHyperlinkOnClick = true;
    options.fields.createHyperlinkTooltip = function(hyperlinkTooltip, hint) {
      return (hyperlinkTooltip + "\nClick to follow link")
    };
    

    updateFieldsBeforePrint Property

    Sets whether the Rich Text Editor updates field values before a documented is printed.

    Declaration

    updateFieldsBeforePrint?: boolean

    Property Value

    Type Description
    boolean

    true, to update field values; otherwise, false.

    updateFieldsOnPaste Property

    Sets whether the control updates the value of the field pasted by a user.

    Declaration

    updateFieldsOnPaste?: boolean

    Property Value

    Type Description
    boolean

    true, to update field values; otherwise, false.