Back to Devexpress

CharacterProperties Class

aspnetcore-js-devexpress-dot-richedit-260ecbaa.md

latest28.0 KB
Original Source

CharacterProperties Class

Contains character properties.

Declaration

ts
export class CharacterProperties

Remarks

javascript
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

ts
allCaps: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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

ts
backColor: string

Property Value

TypeDescription
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

NameHEXNameHEXNameHEXNameHEX
aliceblue#f0f8ffdarkturquoise#00ced1lightskyblue#87cefapeachpuff#ffdab9
antiquewhite#faebd7darkviolet#9400d3lightslateblue#8470ffperu#cd853f
aqua#00ffffdeeppink#ff1493lightslategray#778899pink#ffc0cb
aquamarine#7fffd4deepskyblue#00bffflightsteelblue#b0c4deplum#dda0dd
azure#f0ffffdimgray#696969lightyellow#ffffe0powderblue#b0e0e6
beige#f5f5dcdodgerblue#1e90fflime#00ff00purple#800080
bisque#ffe4c4feldspar#d19275limegreen#32cd32red#ff0000
black#000000firebrick#b22222linen#faf0e6rosybrown#bc8f8f
blanchedalmond#ffebcdfloralwhite#fffaf0magenta#ff00ffroyalblue#4169e1
blue#0000ffforestgreen#228b22maroon#800000saddlebrown#8b4513
blueviolet#8a2be2fuchsia#ff00ffmediumaquamarine#66cdaasalmon#fa8072
brown#a52a2againsboro#dcdcdcmediumblue#0000cdsandybrown#f4a460
burlywood#deb887ghostwhite#f8f8ffmediumorchid#ba55d3seagreen#2e8b57
cadetblue#5f9ea0gold#ffd700mediumpurple#9370d8seashell#fff5ee
chartreuse#7fff00goldenrod#daa520mediumseagreen#3cb371sienna#a0522d
chocolate#d2691egray#808080mediumslateblue#7b68eesilver#c0c0c0
coral#ff7f50green#00ff00mediumspringgreen#00fa9askyblue#87ceeb
cornflowerblue#6495edhoneydew#f0fff0mediumturquoise#48d1ccslateblue#6a5acd
cornsilk#fff8dchotpink#ff69b4mediumvioletred#c71585slategray#708090
crimson#dc143cindianred#cd5c5cmidnightblue#191970snow#fffafa
cyan#00ffffindigo#4b0082mintcream#f5fffaspringgreen#00ff7f
darkblue#00008bivory#fffff0mistyrose#ffe4e1steelblue#4682b4
darkcyan#008b8bkhaki#f0e68cmoccasin#ffe4b5tan#d2b48c
darkgoldenrod#b8860blavender#e6e6fanavajowhite#ffdeadteal#008080
darkgray#a9a9a9lavenderblush#fff0f5navy#000080thistle#d8bfd8
darkgreen#006400lawngreen#7cfc00oldlace#fdf5e6tomato#ff6347
darkkhaki#bdb76blemonchiffon#fffacdolive#808000turquoise#40e0d0
darkmagenta#8b008blightblue#add8e6olivedrab#6b8e23violet#ee82ee
darkolivegreen#556b2flightcoral#f08080orange#ffa500violetred#d02090
darkorange#ff8c00lightcyan#e0fffforangered#ff4500wheat#f5deb3
darkorchid#9932cclightgoldenrodyellow#fafad2orchid#da70d6white#ffffff
darkred#8b0000lightgray#d3d3d3palegoldenrod#eee8aawhitesmoke#f5f5f5
darksalmon#e9967alightgreen#90ee90palegreen#98fb98yellow#ffff00
darkseagreen#8fbc8flightpink#ffb6c1paleturquoise#afeeeeyellowgreen#9acd32
darkslateblue#483d8blightsalmon#ffa07apalevioletred#d87093windowtext#000000
darkslategray#2f4f4flightseagreen#20b2aapapayawhip#ffefd5

Note that the highlight color overlaps the background color.

javascript
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

ts
bold: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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

ts
fontName: string

Property Value

TypeDescription
string

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

|

Remarks

javascript
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

ts
foreColor: string

Property Value

TypeDescription
string

The color value or undefined for mixed colors.

|

Remarks

javascript
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

NameHEXNameHEXNameHEXNameHEX
aliceblue#f0f8ffdarkturquoise#00ced1lightskyblue#87cefapeachpuff#ffdab9
antiquewhite#faebd7darkviolet#9400d3lightslateblue#8470ffperu#cd853f
aqua#00ffffdeeppink#ff1493lightslategray#778899pink#ffc0cb
aquamarine#7fffd4deepskyblue#00bffflightsteelblue#b0c4deplum#dda0dd
azure#f0ffffdimgray#696969lightyellow#ffffe0powderblue#b0e0e6
beige#f5f5dcdodgerblue#1e90fflime#00ff00purple#800080
bisque#ffe4c4feldspar#d19275limegreen#32cd32red#ff0000
black#000000firebrick#b22222linen#faf0e6rosybrown#bc8f8f
blanchedalmond#ffebcdfloralwhite#fffaf0magenta#ff00ffroyalblue#4169e1
blue#0000ffforestgreen#228b22maroon#800000saddlebrown#8b4513
blueviolet#8a2be2fuchsia#ff00ffmediumaquamarine#66cdaasalmon#fa8072
brown#a52a2againsboro#dcdcdcmediumblue#0000cdsandybrown#f4a460
burlywood#deb887ghostwhite#f8f8ffmediumorchid#ba55d3seagreen#2e8b57
cadetblue#5f9ea0gold#ffd700mediumpurple#9370d8seashell#fff5ee
chartreuse#7fff00goldenrod#daa520mediumseagreen#3cb371sienna#a0522d
chocolate#d2691egray#808080mediumslateblue#7b68eesilver#c0c0c0
coral#ff7f50green#00ff00mediumspringgreen#00fa9askyblue#87ceeb
cornflowerblue#6495edhoneydew#f0fff0mediumturquoise#48d1ccslateblue#6a5acd
cornsilk#fff8dchotpink#ff69b4mediumvioletred#c71585slategray#708090
crimson#dc143cindianred#cd5c5cmidnightblue#191970snow#fffafa
cyan#00ffffindigo#4b0082mintcream#f5fffaspringgreen#00ff7f
darkblue#00008bivory#fffff0mistyrose#ffe4e1steelblue#4682b4
darkcyan#008b8bkhaki#f0e68cmoccasin#ffe4b5tan#d2b48c
darkgoldenrod#b8860blavender#e6e6fanavajowhite#ffdeadteal#008080
darkgray#a9a9a9lavenderblush#fff0f5navy#000080thistle#d8bfd8
darkgreen#006400lawngreen#7cfc00oldlace#fdf5e6tomato#ff6347
darkkhaki#bdb76blemonchiffon#fffacdolive#808000turquoise#40e0d0
darkmagenta#8b008blightblue#add8e6olivedrab#6b8e23violet#ee82ee
darkolivegreen#556b2flightcoral#f08080orange#ffa500violetred#d02090
darkorange#ff8c00lightcyan#e0fffforangered#ff4500wheat#f5deb3
darkorchid#9932cclightgoldenrodyellow#fafad2orchid#da70d6white#ffffff
darkred#8b0000lightgray#d3d3d3palegoldenrod#eee8aawhitesmoke#f5f5f5
darksalmon#e9967alightgreen#90ee90palegreen#98fb98yellow#ffff00
darkseagreen#8fbc8flightpink#ffb6c1paleturquoise#afeeeeyellowgreen#9acd32
darkslateblue#483d8blightsalmon#ffa07apalevioletred#d87093windowtext#000000
darkslategray#2f4f4flightseagreen#20b2aapapayawhip#ffefd5

hidden Property

Indicates whether characters are hidden.

Declaration

ts
hidden: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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

ts
highlightColor: string

Property Value

TypeDescription
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

NameHEXNameHEXNameHEXNameHEX
aliceblue#f0f8ffdarkturquoise#00ced1lightskyblue#87cefapeachpuff#ffdab9
antiquewhite#faebd7darkviolet#9400d3lightslateblue#8470ffperu#cd853f
aqua#00ffffdeeppink#ff1493lightslategray#778899pink#ffc0cb
aquamarine#7fffd4deepskyblue#00bffflightsteelblue#b0c4deplum#dda0dd
azure#f0ffffdimgray#696969lightyellow#ffffe0powderblue#b0e0e6
beige#f5f5dcdodgerblue#1e90fflime#00ff00purple#800080
bisque#ffe4c4feldspar#d19275limegreen#32cd32red#ff0000
black#000000firebrick#b22222linen#faf0e6rosybrown#bc8f8f
blanchedalmond#ffebcdfloralwhite#fffaf0magenta#ff00ffroyalblue#4169e1
blue#0000ffforestgreen#228b22maroon#800000saddlebrown#8b4513
blueviolet#8a2be2fuchsia#ff00ffmediumaquamarine#66cdaasalmon#fa8072
brown#a52a2againsboro#dcdcdcmediumblue#0000cdsandybrown#f4a460
burlywood#deb887ghostwhite#f8f8ffmediumorchid#ba55d3seagreen#2e8b57
cadetblue#5f9ea0gold#ffd700mediumpurple#9370d8seashell#fff5ee
chartreuse#7fff00goldenrod#daa520mediumseagreen#3cb371sienna#a0522d
chocolate#d2691egray#808080mediumslateblue#7b68eesilver#c0c0c0
coral#ff7f50green#00ff00mediumspringgreen#00fa9askyblue#87ceeb
cornflowerblue#6495edhoneydew#f0fff0mediumturquoise#48d1ccslateblue#6a5acd
cornsilk#fff8dchotpink#ff69b4mediumvioletred#c71585slategray#708090
crimson#dc143cindianred#cd5c5cmidnightblue#191970snow#fffafa
cyan#00ffffindigo#4b0082mintcream#f5fffaspringgreen#00ff7f
darkblue#00008bivory#fffff0mistyrose#ffe4e1steelblue#4682b4
darkcyan#008b8bkhaki#f0e68cmoccasin#ffe4b5tan#d2b48c
darkgoldenrod#b8860blavender#e6e6fanavajowhite#ffdeadteal#008080
darkgray#a9a9a9lavenderblush#fff0f5navy#000080thistle#d8bfd8
darkgreen#006400lawngreen#7cfc00oldlace#fdf5e6tomato#ff6347
darkkhaki#bdb76blemonchiffon#fffacdolive#808000turquoise#40e0d0
darkmagenta#8b008blightblue#add8e6olivedrab#6b8e23violet#ee82ee
darkolivegreen#556b2flightcoral#f08080orange#ffa500violetred#d02090
darkorange#ff8c00lightcyan#e0fffforangered#ff4500wheat#f5deb3
darkorchid#9932cclightgoldenrodyellow#fafad2orchid#da70d6white#ffffff
darkred#8b0000lightgray#d3d3d3palegoldenrod#eee8aawhitesmoke#f5f5f5
darksalmon#e9967alightgreen#90ee90palegreen#98fb98yellow#ffff00
darkseagreen#8fbc8flightpink#ffb6c1paleturquoise#afeeeeyellowgreen#9acd32
darkslateblue#483d8blightsalmon#ffa07apalevioletred#d87093windowtext#000000
darkslategray#2f4f4flightseagreen#20b2aapapayawhip#ffefd5

Note that the highlight color overlaps the background color.

javascript
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

ts
italic: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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

ts
script: CharacterPropertiesScript

Property Value

TypeDescription
CharacterPropertiesScript

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

|

Remarks

javascript
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

ts
size: number

Property Value

TypeDescription
number

The font size in points or undefined for mixed sizes.

|

Remarks

javascript
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();

smallCaps Property

Specifies whether all characters are small capital letters.

Declaration

ts
smallCaps: boolean

Property Value

TypeDescription
boolean

true if all characters are small capital letters; otherwise, false.

|

Remarks

javascript
var charProps = richEdit.document.getDefaultCharacterProperties();
charProps.smallCaps = true;
richEdit.document.setDefaultCharacterProperties(charProps);

strikeout Property

Indicates whether characters are strikeout.

Declaration

ts
strikeout: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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

ts
underline: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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

ts
underlineColor: string

Property Value

TypeDescription
string

The color value or undefined for mixed colors.

|

Remarks

javascript
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

NameHEXNameHEXNameHEXNameHEX
aliceblue#f0f8ffdarkturquoise#00ced1lightskyblue#87cefapeachpuff#ffdab9
antiquewhite#faebd7darkviolet#9400d3lightslateblue#8470ffperu#cd853f
aqua#00ffffdeeppink#ff1493lightslategray#778899pink#ffc0cb
aquamarine#7fffd4deepskyblue#00bffflightsteelblue#b0c4deplum#dda0dd
azure#f0ffffdimgray#696969lightyellow#ffffe0powderblue#b0e0e6
beige#f5f5dcdodgerblue#1e90fflime#00ff00purple#800080
bisque#ffe4c4feldspar#d19275limegreen#32cd32red#ff0000
black#000000firebrick#b22222linen#faf0e6rosybrown#bc8f8f
blanchedalmond#ffebcdfloralwhite#fffaf0magenta#ff00ffroyalblue#4169e1
blue#0000ffforestgreen#228b22maroon#800000saddlebrown#8b4513
blueviolet#8a2be2fuchsia#ff00ffmediumaquamarine#66cdaasalmon#fa8072
brown#a52a2againsboro#dcdcdcmediumblue#0000cdsandybrown#f4a460
burlywood#deb887ghostwhite#f8f8ffmediumorchid#ba55d3seagreen#2e8b57
cadetblue#5f9ea0gold#ffd700mediumpurple#9370d8seashell#fff5ee
chartreuse#7fff00goldenrod#daa520mediumseagreen#3cb371sienna#a0522d
chocolate#d2691egray#808080mediumslateblue#7b68eesilver#c0c0c0
coral#ff7f50green#00ff00mediumspringgreen#00fa9askyblue#87ceeb
cornflowerblue#6495edhoneydew#f0fff0mediumturquoise#48d1ccslateblue#6a5acd
cornsilk#fff8dchotpink#ff69b4mediumvioletred#c71585slategray#708090
crimson#dc143cindianred#cd5c5cmidnightblue#191970snow#fffafa
cyan#00ffffindigo#4b0082mintcream#f5fffaspringgreen#00ff7f
darkblue#00008bivory#fffff0mistyrose#ffe4e1steelblue#4682b4
darkcyan#008b8bkhaki#f0e68cmoccasin#ffe4b5tan#d2b48c
darkgoldenrod#b8860blavender#e6e6fanavajowhite#ffdeadteal#008080
darkgray#a9a9a9lavenderblush#fff0f5navy#000080thistle#d8bfd8
darkgreen#006400lawngreen#7cfc00oldlace#fdf5e6tomato#ff6347
darkkhaki#bdb76blemonchiffon#fffacdolive#808000turquoise#40e0d0
darkmagenta#8b008blightblue#add8e6olivedrab#6b8e23violet#ee82ee
darkolivegreen#556b2flightcoral#f08080orange#ffa500violetred#d02090
darkorange#ff8c00lightcyan#e0fffforangered#ff4500wheat#f5deb3
darkorchid#9932cclightgoldenrodyellow#fafad2orchid#da70d6white#ffffff
darkred#8b0000lightgray#d3d3d3palegoldenrod#eee8aawhitesmoke#f5f5f5
darksalmon#e9967alightgreen#90ee90palegreen#98fb98yellow#ffff00
darkseagreen#8fbc8flightpink#ffb6c1paleturquoise#afeeeeyellowgreen#9acd32
darkslateblue#483d8blightsalmon#ffa07apalevioletred#d87093windowtext#000000
darkslategray#2f4f4flightseagreen#20b2aapapayawhip#ffefd5

underlineWordsOnly Property

Indicates whether all characters are underlined.

Declaration

ts
underlineWordsOnly: boolean

Property Value

TypeDescription
boolean

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

|

Remarks

javascript
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();