CharacterPropertiesScript Enum
Lists values that specify character script formatting.
Declaration
export enum CharacterPropertiesScript {
Normal = 0,
Subscript = 1,
Superscript = 2
}
Members
Name | Description |
---|---|
Normal
|
Specifies that the text is not formatted as subscript or as superscript. |
Subscript
|
Formats text as subscript. |
Superscript
|
Formats text as superscript. |
Remarks
Values listed by this enumeration are used to set the script property.
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();