UNPKG

@syncfusion/ej2-richtexteditor

Version:
159 lines (156 loc) 6.7 kB
import { EditorManager } from '../base/editor-manager'; /** * This InsertHtml class contains methods to insert HTML nodes or text into a document. * * @hidden */ export declare class InsertHtml { static inlineNode: string[]; static contentsDeleted: boolean; private static isAnotherLiFromEndLi; /** * Inserts an HTML node or text into the specified document. * * @param {Document} docElement - The document where the node should be inserted. * @param {Node | string} insertNode - The node or text to be inserted. Can be a DOM Node or a string representing HTML. * @param {Element} [editNode] - The container or editor node where the insertion will occur. * @param {boolean} [isExternal] - Flag indicating if the node is from an external source. Optional. * @param {string} [enterAction] - Represents the action taken when 'Enter' is pressed. Optional. * @param {EditorManager} [editorManager] - Represents the EditorManager instance. Optional. * @returns {void} * @hidden */ static Insert(docElement: Document, insertNode: Node | string, editNode: Element, isExternal?: boolean, enterAction?: string, editorManager?: EditorManager): void; private static clearTargetCells; private static prepareInsertNode; private static adjustSelectionRange; private static adjustEmptyEditorSelection; private static adjustSelectionToFirstTextNode; private static adjustBrElementSelection; private static handleTableInListItem; private static isCursorAtStartPoint; private static findRelevantParentNode; private static shouldInsertOutsideRange; private static handleContentInsertionOutsideRange; private static extractOrCleanupContent; private static cleanupForTableInsertion; private static removeOriginalNodes; private static insertNodeAtLocation; private static findAppropriateParentNode; private static insertNodeBasedOnContext; private static setSelectionAfterInsertion; private static handleContentInsertionInsideRange; private static shouldInsertInTableCell; private static insertWithRangeHandling; private static isHrElement; private static insertAfterHrElement; private static insertBasedOnStartContainer; private static setCursorAfterInsertion; private static shouldScrollToCursor; private static removeEmptyNextLI; private static findFirstTextNode; private static pasteInsertHTML; private static removeEmptyBrFromParagraph; private static adjustRangeForEmptyEditor; private static setupRangeForPaste; private static containsBlockElements; private static handleInlineContent; private static handleRegularInlineContent; private static handleCursorInlineContent; private static shouldInsertInAnchor; private static insertInAnchor; private static isMentionChip; private static insertFragmentOrReplaceNode; private static replaceWithMatchedContent; private static shouldNormalizeTextNodes; private static handleBlockNodeContent; private static findParentPreElement; private static processInlineNodesBetweenBlocks; private static isBlockElement; private static processBlockContent; private static cleanupBeforeBlockInsertion; private static processFirstInlineNodeSet; private static handleFirstBlockChild; private static isInlineElement; private static processSpecialNodes; private static processGoogleSheetsTable; private static addParagraphAfterTable; private static positionCursorAfterPaste; private static handleListElementCursor; private static handleHRElementCursor; private static compareParentElements; private static getFilteredAttributes; private static getClosestMatchingElement; private static findMatchingChild; private static listCleanUp; private static cleanUpListItems; private static cleanUpFlattenListContainer; private static cleanUpListContainer; private static placeCursorEnd; private static getNodeCollection; private static insertTempNode; private static shouldInsertAfterTable; private static insertNodeAfterTable; private static shouldInsertBeforeTable; private static insertNodeBeforeTable; private static shouldAppendAfterTableAtCursor; private static handleStandardNodeInsertion; private static findBlockNodeForInsertion; private static processListItemsInNode; private static shouldProcessListItems; private static removeListItemMargins; private static isTableCellNode; private static insertInTableCell; private static handleRegularInsertion; private static isEmptySpecialNode; private static handleEmptySpecialNodeInsertion; private static extractChildNodes; private static insertBlockNodesInLI; private static processInsertNodes; private static wrapInlineElementsInSpan; private static unwrapInlineWrappers; private static removeEmptyAfterStartLI; private static clearIfCompletelyEmpty; private static getRootList; private static isRemovableEmptyListItem; private static isTextOrBrInListItem; private static handleTextInListItem; private static findLiFromContainer; private static nonCollapsedInsertion; private static getClosestLi; private static getPreviousLi; private static getNextLi; private static appendListItems; private static moveSiblingsToLiAndInsert; private static handleSingleLiInsertion; private static handleMultiLiInsertion; private static pasteLI; private static handlePasteAtStart; private static handlePasteAtEnd; private static handlePasteInMiddle; private static hasNestedListInsideLi; private static getBlockNodeLength; private static addCursorMarker; private static extractNestedListsIntoNewListItem; private static createLiFragment; private static collectAndRemoveFollowingNodes; private static insertFragmentAfterLi; private static moveAllChildren; private static mergeLastNodeContent; private static getSplitElementForInsertion; private static cursorPos; private static imageFocus; private static getImmediateBlockNode; private static removingComments; private static findDetachEmptyElem; private static removeEmptyElements; private static findClosestRelevantElement; private static isTagInList; private static insertTableInList; private static moveChildNodes; private static alignCheck; private static removeListfromPaste; private static isHorizontalRuleInEmptyBlock; private static isMediaElement; private static insertBlockElementInList; }