Skip to main content

HtmlProcessor

Classes​

CommandKeys​

Constructors​

Constructor​
new CommandKeys(): CommandKeys;
Returns​

CommandKeys

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​

HtmlProcessor

Properties​

initData​
static initData: EditorInitData;

Methods​

applyCommands()​
static applyCommands(
element,
commands,
colorPalette,
colorPreviewService): Promise<void>;
Parameters​
ParameterType
elementHTMLElement
commandsCommand[]
colorPaletteany
colorPreviewServiceIColorPreviewService
Returns​

Promise<void>

customInlineCommand()​
static customInlineCommand(
commands,
range,
innerDiv,
colorPalette,
colorPreviewService): Promise<void>;
Parameters​
ParameterType
commandsCommand[]
rangeany
innerDivHTMLElement
colorPaletteany
colorPreviewServiceIColorPreviewService
Returns​

Promise<void>

findAllSelectedLis()​
static findAllSelectedLis(): HTMLElement[];
Returns​

HTMLElement[]

getAdjacentLi()​
static getAdjacentLi(liNodes): Element;
Parameters​
ParameterType
liNodesHTMLElement[]
Returns​

Element

getCorrectLinesCount()​
static getCorrectLinesCount(innerDiv): number;
Parameters​
ParameterType
innerDivHTMLElement
Returns​

number

getCurrentParagraphLength()​
static getCurrentParagraphLength(paragraphOffset?): number;
Parameters​
ParameterTypeDefault value
paragraphOffsetnumber0
Returns​

number

getDefaultFontValue()​
static getDefaultFontValue(font): HtmlFontValue;
Parameters​
ParameterType
fontIFontSettings
Returns​

HtmlFontValue

getDefaultInlineStyle()​
static getDefaultInlineStyle(style): ICharStyle;
Parameters​
ParameterType
styleICharStyle
Returns​

ICharStyle

getEveryLineLength()​
static getEveryLineLength(innerDiv): number[];
Parameters​
ParameterType
innerDivHTMLElement
Returns​

number[]

getParagraphByIndex()​
static getParagraphByIndex(index): Element;
Parameters​
ParameterType
indexnumber
Returns​

Element

getParagraphIndex()​
static getParagraphIndex(paragraph): number;
Parameters​
ParameterType
paragraphNode
Returns​

number

getParagraphLength()​
static getParagraphLength(paragraph): number;
Parameters​
ParameterType
paragraphNode
Returns​

number

getParagraphLengthByIndex()​
static getParagraphLengthByIndex(index): number;
Parameters​
ParameterType
indexnumber
Returns​

number

insertTextAtCaret()​
static insertTextAtCaret(text): void;
Parameters​
ParameterType
textstring
Returns​

void

isAnyList()​
static isAnyList(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isBr()​
static isBr(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isBulletedList()​
static isBulletedList(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isCaretOnEndOfParagraph()​
static isCaretOnEndOfParagraph(lineLength): boolean;
Parameters​
ParameterType
lineLengthnumber
Returns​

boolean

isCaretOnTheBeginingOfListItem()​
static isCaretOnTheBeginingOfListItem(): boolean;
Returns​

boolean

isCaretOnTheBeginingOfParagraph()​
static isCaretOnTheBeginingOfParagraph(): boolean;
Returns​

boolean

isListItem()​
static isListItem(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isNumberedList()​
static isNumberedList(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isParagraph()​
static isParagraph(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isSpan()​
static isSpan(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

isText()​
static isText(e): boolean;
Parameters​
ParameterType
eNode
Returns​

boolean

paragraphStyleToCommands()​
static paragraphStyleToCommands(value, useDocumentCommands?): Command[];
Parameters​
ParameterTypeDefault value
valueIParagraphStyleundefined
useDocumentCommandsbooleantrue
Returns​

Command[]

processEnterOnEmptyListItem()​
static processEnterOnEmptyListItem(e, innerDiv): void;
Parameters​
ParameterType
eKeyboardEvent
innerDivHTMLElement
Returns​

void

saveSelection()​
static saveSelection(context, offset?): () => void;
Parameters​
ParameterTypeDefault value
contextNodeundefined
offsetnumber0
Returns​

() => void

setAdjacentLiStyle()​
static setAdjacentLiStyle(liNodes, adjacentLi): void;
Parameters​
ParameterType
liNodesHTMLElement[]
adjacentLiElement
Returns​

void

setInitData()​
static setInitData(data): void;
Parameters​
ParameterType
dataEditorInitData
Returns​

void

setListStyle()​
static setListStyle(liNodes, listType): void;
Parameters​
ParameterType
liNodesHTMLElement[]
listTypenumber
Returns​

void

setPreviewScale()​
static setPreviewScale(scale): void;
Parameters​
ParameterType
scalenumber
Returns​

void

wrapSpansWithP()​
static wrapSpansWithP(): void;
Returns​

void

Was this page helpful?