Back to Devexpress

CharacterPropertiesScript Enum

aspnetcore-js-devexpress-dot-richedit-229d8ebb.md

latest1.2 KB
Original Source

CharacterPropertiesScript Enum

Lists values that specify character script formatting.

Declaration

ts
export enum CharacterPropertiesScript {
    Normal = 0,
    Subscript = 1,
    Superscript = 2
}

Members

NameDescription
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.

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