devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
31 lines (30 loc) • 1.38 kB
JavaScript
import { CharacterPropertyDescriptor } from '../../model/character/character-property-descriptor';
import { CharacterFormattingScript } from '../../model/character/enums';
import { ChangeCharacterPropertiesCommandBase } from './change-character-properties-command-base';
export class ChangeFontScriptCommand extends ChangeCharacterPropertiesCommandBase {
getDescriptor() {
return CharacterPropertyDescriptor.script;
}
}
export class ToggleFontSubscriptCommand extends ChangeCharacterPropertiesCommandBase {
getDescriptor() {
return CharacterPropertyDescriptor.script;
}
getValueForState(val) {
return val == CharacterFormattingScript.Subscript;
}
DEPRECATEDConvertOptionsParameter(parameter) {
return this.convertBooleanParameterToEnumType(parameter, CharacterFormattingScript.Subscript, CharacterFormattingScript.Normal);
}
}
export class ToggleFontSuperscriptCommand extends ChangeCharacterPropertiesCommandBase {
getDescriptor() {
return CharacterPropertyDescriptor.script;
}
getValueForState(val) {
return val == CharacterFormattingScript.Superscript;
}
DEPRECATEDConvertOptionsParameter(parameter) {
return this.convertBooleanParameterToEnumType(parameter, CharacterFormattingScript.Superscript, CharacterFormattingScript.Normal);
}
}