devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
18 lines (17 loc) • 600 B
JavaScript
export class WriterHelper {
static convertToHexString(value) {
return value.toString(16);
}
static getValueFromTables(table, value, defaultValue) {
const res = table.exportMap[value];
return res !== undefined ?
res.mlValue.openXmlValue :
table.exportMap[defaultValue].mlValue.openXmlValue;
}
static getValueFromTablesExplicitDefault(table, value, defaultValue) {
const res = table.exportMap[value];
return res !== undefined ?
res.mlValue.openXmlValue :
defaultValue;
}
}