Static
afterInsert newElement after element
Static
appendInsert newElement as last child inside element
Static
appendAppend new element in the start of root
Static
beforeInsert newElement before element
Static
betweenStatic
canStatic
closestFind parent by tag name
Static
detachStatic
eachIt goes through all the internal elements of the node, causing a callback function
Jodit.modules.Dom.each(editor.s.current(), function (node) {
if (node.nodeType === Node.TEXT_NODE) {
node.nodeValue = node.nodeValue.replace(Jodit.INVISIBLE_SPACE_REG_EX, '') // remove all of the text element codes invisible character
}
});
Static
eachStatic
findFind next/prev node what condition(next) === true
Static
findStatic
findStatic
findStatic
findFind next/prev node what condition(next) === true
Static
furthestFurthest parent node matching condition
Static
hideHide element
Static
isCheck the node
is a block element
Object to check
Static
isCheck if element is table cell
Static
isThe node is editable
Static
isStatic
isStatic
isStatic
isStatic
isCheck if element is document fragment
Static
isHTMLElementCheck if element is HTMLElement node
Static
isCheck is element is Image element
Static
isCheck element is inline block
Static
isCheck if element is a part of list element LI
Static
isCheck if element is a list element UL or OL
Static
isStatic
isStatic
isCheck if element is some tag
Static
isStatic
isStatic
lastStatic
markMarks an item as temporary
Optional
attributes: IDictionaryStatic
moveStatic
nextFind next node what condition(next) === true
Static
nextStatic
nextStatic
prependInsert newElement as first child inside element
Static
prevFind previous node
Static
prevStatic
replaceReplace one tag to another transfer content
The element that needs to be replaced by new
tag name for which will change elm
Optional
withAttributes: booleanIf true move tag's attributes
Optional
notMoveContent: booleanfalse - Move content from elm to newTagName
Jodit.modules.Dom.replace(parent.editor.getElementsByTagName('span')[0], 'p');
// Replace the first <span> element to the < p >
Static
replaceStatic
safeStatic
safeStatic
showShow element
Static
siblingStatic
temporaryGet temporary list
Static
unwrapRemove parent of node and insert this node instead that parent
Static
upIt goes through all the elements in ascending order, and checks to see if they meet the predetermined condition
Optional
root: NodeStatic
wrapWrap node inside another node
Wrap node inside another node
Static
wrapWrap all inline siblings
If you like Jodit - try Jodit PRO
Module for working with DOM