aspnetcore-js-devexpress-dot-richedit-229d8ebb.md
Lists values that specify character script formatting.
export enum CharacterPropertiesScript {
Normal = 0,
Subscript = 1,
Superscript = 2
}
| 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.
|
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();