HtmlProcessor
Classes
CommandKeys
Constructors
Constructor
new CommandKeys(): CommandKeys;
Returns
Properties
alignment
static alignment: string = "alignment";
allCaps
static allCaps: string = "all-caps";
bold
static bold: string = "bold";
color
static color: string = "color";
documentCommands
static documentCommands: CommandKeys[];
firstLineIndent
static firstLineIndent: string = "first-line-indent";
fontName
static fontName: string = "fontName";
fontSize
static fontSize: string = "fontSize";
italic
static italic: string = "italic";
justifyCenter
static justifyCenter: string = "justifyCenter";
justifyFull
static justifyFull: string = "justifyFull";
justifyLeft
static justifyLeft: string = "justifyLeft";
justifyRight
static justifyRight: string = "justifyRight";
leading
static leading: string = "leading";
leftIndent
static leftIndent: string = "left-indent";
openType
static openType: string = "open-type";
rightIndent
static rightIndent: string = "right-indent";
smallCaps
static smallCaps: string = "small-caps";
spaceAfter
static spaceAfter: string = "space-after";
spaceBefore
static spaceBefore: string = "space-before";
stroke
static stroke: string = "stroke";
subscript
static subscript: string = "subscript";
superscript
static superscript: string = "superscript";
tracking
static tracking: string = "tracking";
underline
static underline: string = "underline";
verticalAlignment
static verticalAlignment: string = "vertical-alignment";
verticalAlignmentBottom
static verticalAlignmentBottom: string = "verticalAlignmentBottom";
verticalAlignmentCenter
static verticalAlignmentCenter: string = "verticalAlignmentCenter";
verticalAlignmentTop
static verticalAlignmentTop: string = "verticalAlignmentTop";
HtmlProcessor
Constructors
Constructor
new HtmlProcessor(): HtmlProcessor;
Returns
Properties
initData
static initData: EditorInitData;
Methods
applyCommands()
static applyCommands(
element,
commands,
colorPalette,
colorPreviewService): Promise<void>;
Parameters
| Parameter | Type |
|---|---|
element | HTMLElement |
commands | Command[] |
colorPalette | any |
colorPreviewService | IColorPreviewService |
Returns
Promise<void>
customInlineCommand()
static customInlineCommand(
commands,
range,
innerDiv,
colorPalette,
colorPreviewService): Promise<void>;
Parameters
| Parameter | Type |
|---|---|
commands | Command[] |
range | any |
innerDiv | HTMLElement |
colorPalette | any |
colorPreviewService | IColorPreviewService |
Returns
Promise<void>
findAllSelectedLis()
static findAllSelectedLis(): HTMLElement[];
Returns
HTMLElement[]
getAdjacentLi()
static getAdjacentLi(liNodes): Element;
Parameters
| Parameter | Type |
|---|---|
liNodes | HTMLElement[] |
Returns
Element
getCorrectLinesCount()
static getCorrectLinesCount(innerDiv): number;
Parameters
| Parameter | Type |
|---|---|
innerDiv | HTMLElement |
Returns
number
getCurrentParagraphLength()
static getCurrentParagraphLength(paragraphOffset?): number;
Parameters
| Parameter | Type | Default value |
|---|---|---|
paragraphOffset | number | 0 |
Returns
number
getDefaultFontValue()
static getDefaultFontValue(font): HtmlFontValue;
Parameters
| Parameter | Type |
|---|---|
font | IFontSettings |
Returns
getDefaultInlineStyle()
static getDefaultInlineStyle(style): ICharStyle;
Parameters
| Parameter | Type |
|---|---|
style | ICharStyle |
Returns
getEveryLineLength()
static getEveryLineLength(innerDiv): number[];
Parameters
| Parameter | Type |
|---|---|
innerDiv | HTMLElement |
Returns
number[]
getParagraphByIndex()
static getParagraphByIndex(index): Element;
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
Element
getParagraphIndex()
static getParagraphIndex(paragraph): number;
Parameters
| Parameter | Type |
|---|---|
paragraph | Node |
Returns
number
getParagraphLength()
static getParagraphLength(paragraph): number;
Parameters
| Parameter | Type |
|---|---|
paragraph | Node |
Returns
number
getParagraphLengthByIndex()
static getParagraphLengthByIndex(index): number;
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
number
insertTextAtCaret()
static insertTextAtCaret(text): void;
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
void
isAnyList()
static isAnyList(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isBr()
static isBr(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isBulletedList()
static isBulletedList(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isCaretOnEndOfParagraph()
static isCaretOnEndOfParagraph(lineLength): boolean;
Parameters
| Parameter | Type |
|---|---|
lineLength | number |
Returns
boolean
isCaretOnTheBeginingOfListItem()
static isCaretOnTheBeginingOfListItem(): boolean;
Returns
boolean
isCaretOnTheBeginingOfParagraph()
static isCaretOnTheBeginingOfParagraph(): boolean;
Returns
boolean
isListItem()
static isListItem(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isNumberedList()
static isNumberedList(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isParagraph()
static isParagraph(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isSpan()
static isSpan(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
isText()
static isText(e): boolean;
Parameters
| Parameter | Type |
|---|---|
e | Node |
Returns
boolean
paragraphStyleToCommands()
static paragraphStyleToCommands(value, useDocumentCommands?): Command[];
Parameters
| Parameter | Type | Default value |
|---|---|---|
value | IParagraphStyle | undefined |
useDocumentCommands | boolean | true |
Returns
Command[]
processEnterOnEmptyListItem()
static processEnterOnEmptyListItem(e, innerDiv): void;
Parameters
| Parameter | Type |
|---|---|
e | KeyboardEvent |
innerDiv | HTMLElement |
Returns
void
saveSelection()
static saveSelection(context, offset?): () => void;
Parameters
| Parameter | Type | Default value |
|---|---|---|
context | Node | undefined |
offset | number | 0 |
Returns
() => void
setAdjacentLiStyle()
static setAdjacentLiStyle(liNodes, adjacentLi): void;
Parameters
| Parameter | Type |
|---|---|
liNodes | HTMLElement[] |
adjacentLi | Element |
Returns
void
setInitData()
static setInitData(data): void;
Parameters
| Parameter | Type |
|---|---|
data | EditorInitData |
Returns
void
setListStyle()
static setListStyle(liNodes, listType): void;
Parameters
| Parameter | Type |
|---|---|
liNodes | HTMLElement[] |
listType | number |
Returns
void
setPreviewScale()
static setPreviewScale(scale): void;
Parameters
| Parameter | Type |
|---|---|
scale | number |
Returns
void
wrapSpansWithP()
static wrapSpansWithP(): void;
Returns
void