tiptap/packages/core/src/utils/removeElement.ts

5 lines
150 B
TypeScript
Raw Normal View History

2020-03-31 19:06:34 +08:00
export default function removeElement(element: HTMLElement) {
if (element && element.parentNode) {
element.parentNode.removeChild(element)
}
}