Skip to main content
A newer version of this page is available. .

CharacterProperties Class

Contains character properties.

Declaration

export class CharacterProperties

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

Properties

allCaps Property

Indicates whether all characters are capital letters.

Declaration

allCaps: boolean

Property Value

Type Description
boolean

true if all characters are capitalized; otherwise, false or undefined for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

backColor Property

Specifies the background color of character(s).

Declaration

backColor: string

Property Value

Type Description
string

The color value or undefined for mixed colors.

Remarks

The following color formats are available:

  • 'Auto' and 'NoColor' values.
  • Hexadecimal notation (for example, '#31bb32').
  • RGB format (for example, 'rgb(51,187,51)').
  • Named colors (for example, 'darkturquoise').
Show allowed color names
Name HEX Name HEX Name HEX Name HEX
aliceblue #f0f8ff darkturquoise #00ced1 lightskyblue #87cefa peachpuff #ffdab9
antiquewhite #faebd7 darkviolet #9400d3 lightslateblue #8470ff peru #cd853f
aqua #00ffff deeppink #ff1493 lightslategray #778899 pink #ffc0cb
aquamarine #7fffd4 deepskyblue #00bfff lightsteelblue #b0c4de plum #dda0dd
azure #f0ffff dimgray #696969 lightyellow #ffffe0 powderblue #b0e0e6
beige #f5f5dc dodgerblue #1e90ff lime #00ff00 purple #800080
bisque #ffe4c4 feldspar #d19275 limegreen #32cd32 red #ff0000
black #000000 firebrick #b22222 linen #faf0e6 rosybrown #bc8f8f
blanchedalmond #ffebcd floralwhite #fffaf0 magenta #ff00ff royalblue #4169e1
blue #0000ff forestgreen #228b22 maroon #800000 saddlebrown #8b4513
blueviolet #8a2be2 fuchsia #ff00ff mediumaquamarine #66cdaa salmon #fa8072
brown #a52a2a gainsboro #dcdcdc mediumblue #0000cd sandybrown #f4a460
burlywood #deb887 ghostwhite #f8f8ff mediumorchid #ba55d3 seagreen #2e8b57
cadetblue #5f9ea0 gold #ffd700 mediumpurple #9370d8 seashell #fff5ee
chartreuse #7fff00 goldenrod #daa520 mediumseagreen #3cb371 sienna #a0522d
chocolate #d2691e gray #808080 mediumslateblue #7b68ee silver #c0c0c0
coral #ff7f50 green #00ff00 mediumspringgreen #00fa9a skyblue #87ceeb
cornflowerblue #6495ed honeydew #f0fff0 mediumturquoise #48d1cc slateblue #6a5acd
cornsilk #fff8dc hotpink #ff69b4 mediumvioletred #c71585 slategray #708090
crimson #dc143c indianred #cd5c5c midnightblue #191970 snow #fffafa
cyan #00ffff indigo #4b0082 mintcream #f5fffa springgreen #00ff7f
darkblue #00008b ivory #fffff0 mistyrose #ffe4e1 steelblue #4682b4
darkcyan #008b8b khaki #f0e68c moccasin #ffe4b5 tan #d2b48c
darkgoldenrod #b8860b lavender #e6e6fa navajowhite #ffdead teal #008080
darkgray #a9a9a9 lavenderblush #fff0f5 navy #000080 thistle #d8bfd8
darkgreen #006400 lawngreen #7cfc00 oldlace #fdf5e6 tomato #ff6347
darkkhaki #bdb76b lemonchiffon #fffacd olive #808000 turquoise #40e0d0
darkmagenta #8b008b lightblue #add8e6 olivedrab #6b8e23 violet #ee82ee
darkolivegreen #556b2f lightcoral #f08080 orange #ffa500 violetred #d02090
darkorange #ff8c00 lightcyan #e0ffff orangered #ff4500 wheat #f5deb3
darkorchid #9932cc lightgoldenrodyellow #fafad2 orchid #da70d6 white #ffffff
darkred #8b0000 lightgray #d3d3d3 palegoldenrod #eee8aa whitesmoke #f5f5f5
darksalmon #e9967a lightgreen #90ee90 palegreen #98fb98 yellow #ffff00
darkseagreen #8fbc8f lightpink #ffb6c1 paleturquoise #afeeee yellowgreen #9acd32
darkslateblue #483d8b lightsalmon #ffa07a palevioletred #d87093 windowtext #000000
darkslategray #2f4f4f lightseagreen #20b2aa papayawhip #ffefd5

Note that the highlight color overlaps the background color.

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

bold Property

Indicates whether characters are bold.

Declaration

bold: boolean

Property Value

Type Description
boolean

true if characters are bold; otherwise, false or undefined for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

fontName Property

Specifies the character(s) font name.

Declaration

fontName: string

Property Value

Type Description
string

The font name or undefined for a mixture of font names.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

foreColor Property

Specifies the color of character(s).

Declaration

foreColor: string

Property Value

Type Description
string

The color value or undefined for mixed colors.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

The following color formats are available:

  • 'Auto' and 'NoColor' values.
  • Hexadecimal notation (for example, '#31bb32').
  • RGB format (for example, 'rgb(51,187,51)').
  • Named colors (for example, 'darkturquoise').
Show allowed color names
Name HEX Name HEX Name HEX Name HEX
aliceblue #f0f8ff darkturquoise #00ced1 lightskyblue #87cefa peachpuff #ffdab9
antiquewhite #faebd7 darkviolet #9400d3 lightslateblue #8470ff peru #cd853f
aqua #00ffff deeppink #ff1493 lightslategray #778899 pink #ffc0cb
aquamarine #7fffd4 deepskyblue #00bfff lightsteelblue #b0c4de plum #dda0dd
azure #f0ffff dimgray #696969 lightyellow #ffffe0 powderblue #b0e0e6
beige #f5f5dc dodgerblue #1e90ff lime #00ff00 purple #800080
bisque #ffe4c4 feldspar #d19275 limegreen #32cd32 red #ff0000
black #000000 firebrick #b22222 linen #faf0e6 rosybrown #bc8f8f
blanchedalmond #ffebcd floralwhite #fffaf0 magenta #ff00ff royalblue #4169e1
blue #0000ff forestgreen #228b22 maroon #800000 saddlebrown #8b4513
blueviolet #8a2be2 fuchsia #ff00ff mediumaquamarine #66cdaa salmon #fa8072
brown #a52a2a gainsboro #dcdcdc mediumblue #0000cd sandybrown #f4a460
burlywood #deb887 ghostwhite #f8f8ff mediumorchid #ba55d3 seagreen #2e8b57
cadetblue #5f9ea0 gold #ffd700 mediumpurple #9370d8 seashell #fff5ee
chartreuse #7fff00 goldenrod #daa520 mediumseagreen #3cb371 sienna #a0522d
chocolate #d2691e gray #808080 mediumslateblue #7b68ee silver #c0c0c0
coral #ff7f50 green #00ff00 mediumspringgreen #00fa9a skyblue #87ceeb
cornflowerblue #6495ed honeydew #f0fff0 mediumturquoise #48d1cc slateblue #6a5acd
cornsilk #fff8dc hotpink #ff69b4 mediumvioletred #c71585 slategray #708090
crimson #dc143c indianred #cd5c5c midnightblue #191970 snow #fffafa
cyan #00ffff indigo #4b0082 mintcream #f5fffa springgreen #00ff7f
darkblue #00008b ivory #fffff0 mistyrose #ffe4e1 steelblue #4682b4
darkcyan #008b8b khaki #f0e68c moccasin #ffe4b5 tan #d2b48c
darkgoldenrod #b8860b lavender #e6e6fa navajowhite #ffdead teal #008080
darkgray #a9a9a9 lavenderblush #fff0f5 navy #000080 thistle #d8bfd8
darkgreen #006400 lawngreen #7cfc00 oldlace #fdf5e6 tomato #ff6347
darkkhaki #bdb76b lemonchiffon #fffacd olive #808000 turquoise #40e0d0
darkmagenta #8b008b lightblue #add8e6 olivedrab #6b8e23 violet #ee82ee
darkolivegreen #556b2f lightcoral #f08080 orange #ffa500 violetred #d02090
darkorange #ff8c00 lightcyan #e0ffff orangered #ff4500 wheat #f5deb3
darkorchid #9932cc lightgoldenrodyellow #fafad2 orchid #da70d6 white #ffffff
darkred #8b0000 lightgray #d3d3d3 palegoldenrod #eee8aa whitesmoke #f5f5f5
darksalmon #e9967a lightgreen #90ee90 palegreen #98fb98 yellow #ffff00
darkseagreen #8fbc8f lightpink #ffb6c1 paleturquoise #afeeee yellowgreen #9acd32
darkslateblue #483d8b lightsalmon #ffa07a palevioletred #d87093 windowtext #000000
darkslategray #2f4f4f lightseagreen #20b2aa papayawhip #ffefd5

hidden Property

Indicates whether characters are hidden.

Declaration

hidden: boolean

Property Value

Type Description
boolean

true if characters are hidden; otherwise, false or undefined, for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

highlightColor Property

Specifies the highlight color of character(s).

Declaration

highlightColor: string

Property Value

Type Description
string

The color value or undefined for mixed colors.

Remarks

The following color formats are available:

  • 'Auto' and 'NoColor' values.
  • Hexadecimal notation (for example, '#31bb32').
  • RGB format (for example, 'rgb(51,187,51)').
  • Named colors (for example, 'darkturquoise').
Show allowed color names
Name HEX Name HEX Name HEX Name HEX
aliceblue #f0f8ff darkturquoise #00ced1 lightskyblue #87cefa peachpuff #ffdab9
antiquewhite #faebd7 darkviolet #9400d3 lightslateblue #8470ff peru #cd853f
aqua #00ffff deeppink #ff1493 lightslategray #778899 pink #ffc0cb
aquamarine #7fffd4 deepskyblue #00bfff lightsteelblue #b0c4de plum #dda0dd
azure #f0ffff dimgray #696969 lightyellow #ffffe0 powderblue #b0e0e6
beige #f5f5dc dodgerblue #1e90ff lime #00ff00 purple #800080
bisque #ffe4c4 feldspar #d19275 limegreen #32cd32 red #ff0000
black #000000 firebrick #b22222 linen #faf0e6 rosybrown #bc8f8f
blanchedalmond #ffebcd floralwhite #fffaf0 magenta #ff00ff royalblue #4169e1
blue #0000ff forestgreen #228b22 maroon #800000 saddlebrown #8b4513
blueviolet #8a2be2 fuchsia #ff00ff mediumaquamarine #66cdaa salmon #fa8072
brown #a52a2a gainsboro #dcdcdc mediumblue #0000cd sandybrown #f4a460
burlywood #deb887 ghostwhite #f8f8ff mediumorchid #ba55d3 seagreen #2e8b57
cadetblue #5f9ea0 gold #ffd700 mediumpurple #9370d8 seashell #fff5ee
chartreuse #7fff00 goldenrod #daa520 mediumseagreen #3cb371 sienna #a0522d
chocolate #d2691e gray #808080 mediumslateblue #7b68ee silver #c0c0c0
coral #ff7f50 green #00ff00 mediumspringgreen #00fa9a skyblue #87ceeb
cornflowerblue #6495ed honeydew #f0fff0 mediumturquoise #48d1cc slateblue #6a5acd
cornsilk #fff8dc hotpink #ff69b4 mediumvioletred #c71585 slategray #708090
crimson #dc143c indianred #cd5c5c midnightblue #191970 snow #fffafa
cyan #00ffff indigo #4b0082 mintcream #f5fffa springgreen #00ff7f
darkblue #00008b ivory #fffff0 mistyrose #ffe4e1 steelblue #4682b4
darkcyan #008b8b khaki #f0e68c moccasin #ffe4b5 tan #d2b48c
darkgoldenrod #b8860b lavender #e6e6fa navajowhite #ffdead teal #008080
darkgray #a9a9a9 lavenderblush #fff0f5 navy #000080 thistle #d8bfd8
darkgreen #006400 lawngreen #7cfc00 oldlace #fdf5e6 tomato #ff6347
darkkhaki #bdb76b lemonchiffon #fffacd olive #808000 turquoise #40e0d0
darkmagenta #8b008b lightblue #add8e6 olivedrab #6b8e23 violet #ee82ee
darkolivegreen #556b2f lightcoral #f08080 orange #ffa500 violetred #d02090
darkorange #ff8c00 lightcyan #e0ffff orangered #ff4500 wheat #f5deb3
darkorchid #9932cc lightgoldenrodyellow #fafad2 orchid #da70d6 white #ffffff
darkred #8b0000 lightgray #d3d3d3 palegoldenrod #eee8aa whitesmoke #f5f5f5
darksalmon #e9967a lightgreen #90ee90 palegreen #98fb98 yellow #ffff00
darkseagreen #8fbc8f lightpink #ffb6c1 paleturquoise #afeeee yellowgreen #9acd32
darkslateblue #483d8b lightsalmon #ffa07a palevioletred #d87093 windowtext #000000
darkslategray #2f4f4f lightseagreen #20b2aa papayawhip #ffefd5

Note that the highlight color overlaps the background color.

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

italic Property

Indicates whether characters are italicized.

Declaration

italic: boolean

Property Value

Type Description
boolean

true if characters are italicized; otherwise, false or undefined for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

script Property

Specifies the character script format.

Declaration

script: CharacterPropertiesScript

Property Value

Type Description
CharacterPropertiesScript

The script format value or undefined for a mixture of formats.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

size Property

Specifies the character font size.

Declaration

size: number

Property Value

Type Description
number

The font size in points or undefined for mixed sizes.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

strikeout Property

Indicates whether characters are strikeout.

Declaration

strikeout: boolean

Property Value

Type Description
boolean

true if characters are strikeout; otherwise, false or undefined for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

underline Property

Indicates whether characters are underlined.

Declaration

underline: boolean

Property Value

Type Description
boolean

true if characters are underlined; otherwise, false or undefined for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

underlineColor Property

Specifies the color of the underline for the specified characters.

Declaration

underlineColor: string

Property Value

Type Description
string

The color value or undefined for mixed colors.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();

The following color formats are available:

  • 'Auto' and 'NoColor' values.
  • Hexadecimal notation (for example, '#31bb32').
  • RGB format (for example, 'rgb(51,187,51)').
  • Named colors (for example, 'darkturquoise').
Show allowed color names
Name HEX Name HEX Name HEX Name HEX
aliceblue #f0f8ff darkturquoise #00ced1 lightskyblue #87cefa peachpuff #ffdab9
antiquewhite #faebd7 darkviolet #9400d3 lightslateblue #8470ff peru #cd853f
aqua #00ffff deeppink #ff1493 lightslategray #778899 pink #ffc0cb
aquamarine #7fffd4 deepskyblue #00bfff lightsteelblue #b0c4de plum #dda0dd
azure #f0ffff dimgray #696969 lightyellow #ffffe0 powderblue #b0e0e6
beige #f5f5dc dodgerblue #1e90ff lime #00ff00 purple #800080
bisque #ffe4c4 feldspar #d19275 limegreen #32cd32 red #ff0000
black #000000 firebrick #b22222 linen #faf0e6 rosybrown #bc8f8f
blanchedalmond #ffebcd floralwhite #fffaf0 magenta #ff00ff royalblue #4169e1
blue #0000ff forestgreen #228b22 maroon #800000 saddlebrown #8b4513
blueviolet #8a2be2 fuchsia #ff00ff mediumaquamarine #66cdaa salmon #fa8072
brown #a52a2a gainsboro #dcdcdc mediumblue #0000cd sandybrown #f4a460
burlywood #deb887 ghostwhite #f8f8ff mediumorchid #ba55d3 seagreen #2e8b57
cadetblue #5f9ea0 gold #ffd700 mediumpurple #9370d8 seashell #fff5ee
chartreuse #7fff00 goldenrod #daa520 mediumseagreen #3cb371 sienna #a0522d
chocolate #d2691e gray #808080 mediumslateblue #7b68ee silver #c0c0c0
coral #ff7f50 green #00ff00 mediumspringgreen #00fa9a skyblue #87ceeb
cornflowerblue #6495ed honeydew #f0fff0 mediumturquoise #48d1cc slateblue #6a5acd
cornsilk #fff8dc hotpink #ff69b4 mediumvioletred #c71585 slategray #708090
crimson #dc143c indianred #cd5c5c midnightblue #191970 snow #fffafa
cyan #00ffff indigo #4b0082 mintcream #f5fffa springgreen #00ff7f
darkblue #00008b ivory #fffff0 mistyrose #ffe4e1 steelblue #4682b4
darkcyan #008b8b khaki #f0e68c moccasin #ffe4b5 tan #d2b48c
darkgoldenrod #b8860b lavender #e6e6fa navajowhite #ffdead teal #008080
darkgray #a9a9a9 lavenderblush #fff0f5 navy #000080 thistle #d8bfd8
darkgreen #006400 lawngreen #7cfc00 oldlace #fdf5e6 tomato #ff6347
darkkhaki #bdb76b lemonchiffon #fffacd olive #808000 turquoise #40e0d0
darkmagenta #8b008b lightblue #add8e6 olivedrab #6b8e23 violet #ee82ee
darkolivegreen #556b2f lightcoral #f08080 orange #ffa500 violetred #d02090
darkorange #ff8c00 lightcyan #e0ffff orangered #ff4500 wheat #f5deb3
darkorchid #9932cc lightgoldenrodyellow #fafad2 orchid #da70d6 white #ffffff
darkred #8b0000 lightgray #d3d3d3 palegoldenrod #eee8aa whitesmoke #f5f5f5
darksalmon #e9967a lightgreen #90ee90 palegreen #98fb98 yellow #ffff00
darkseagreen #8fbc8f lightpink #ffb6c1 paleturquoise #afeeee yellowgreen #9acd32
darkslateblue #483d8b lightsalmon #ffa07a palevioletred #d87093 windowtext #000000
darkslategray #2f4f4f lightseagreen #20b2aa papayawhip #ffefd5

underlineWordsOnly Property

Indicates whether all characters are underlined.

Declaration

underlineWordsOnly: boolean

Property Value

Type Description
boolean

true if all characters are capitalized; otherwise, false or undefined for a mixture of true and false.

Remarks

var subDocument = richEdit.selection.activeSubDocument;
var position = richEdit.selection.active;
var characterProperties = {
    bold: true,
    fontName: richEdit.document.fonts.getByIndex(0).name,
    highlightColor: "ffff00",
};

richEdit.history.beginTransaction();
richEdit.beginUpdate();
var interval = subDocument.insertText(position, "text");
subDocument.setCharacterProperties(interval, characterProperties);
richEdit.endUpdate();
richEdit.history.endTransaction();