devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
15 lines (14 loc) • 672 B
JavaScript
import { ParagraphPropertyDescriptor } from '../../model/paragraph/paragraph-properties';
import { UnitConverter } from '@devexpress/utils/lib/class/unit-converter';
import { LineSpacingParagraphCommandBase } from './add-spacing-after-paragraph-command';
export class AddSpacingBeforeParagraphCommand extends LineSpacingParagraphCommandBase {
getDescriptor() {
return ParagraphPropertyDescriptor.spacingBefore;
}
isEnabled() {
return super.isEnabled() && this.getCurrentValue() === 0;
}
DEPRECATEDConvertOptionsParameter(parameter) {
return parameter == null ? UnitConverter.pointsToTwips(12) : parameter;
}
}