PrizmDoc v12.2 - March 9, 2017
Pre-Loaded Search Parameters

preDefinedSearch Parameters

This object contains all predefined search options:

Parameter

Data Type

Description

highlightColor

String

The default highlight color of the search terms. This is overridden by the term-level parameter. This must be in 6 digit hexadecimal format preceded by a #.

Example: "#ee3a8c"

searchOnInit

Boolean

Run search on launch.

globalOptions

Object

Set the default search options for each of the predefined search terms. This is overridden by the term-level "options" parameter.

Example:

predefinedSearch : {

    globalOptions: {

        matchCase: false,

        endsWith: false,

        beginsWith: false,

        matchWholeWord: false

    }

}

terms

Array

An array of objects that represent the search terms that will be available in the predefined search menu.

Example:

predefinedSearch : {

    terms: [

        {

            searchTerm: "llama"

        }

    ]

}

 

predefinedSearch terms

This object represents the search terms that will be available in the predefined search menu:

Parameter

Data Type

Description

searchTerm

String

The search string for the term object. This is overridden by the userDefinedRegex parameter.

userDefinedRegex

String

A regular expression that will be searched in place of searchTerm. The first and last forward slashes, as well as the flags, are stripped from the string. For example, "/Pa(\\w+)/ig" will become "Pa(\\w+)".

When special characters (ex: backslash) are used in the "userDefinedRegex" field, they need to be properly escaped. For example, for searching words that begins with "Pa", the regular expression will be "Pa(\w+)", this regular expression should be properly escaped like this "Pa(\\w+)".

All patterns use the Global(g) flag.

Example:

predefinedSearch : {

    terms: [

        {

            searchTerm: "4 digits"

            userdefinedRegex: "(\\d{4})"

        }

    ]

}

selected

Boolean

Whether or not this term will be selected in the menu.

options

Object

Set the search options for this term. If a parameter is not defined it will inherit the globalOptions-level parameter.

Example:

predefinedSearch : {

    terms: [

        {

            searchTerm: "Lla"

            options: {

                matchCase: true,

                endsWith: false,

                beginsWith: true,

                matchWholeWord: false

        }

    }

}

 

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback