jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
18 lines (17 loc) • 553 B
JavaScript
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
*/
import { Dom } from "../../../core/dom/dom.js";
/**
* @private
*/
export const getItem = (node, root, tag = 'a') => Dom.closest(node, elm => Dom.isTag(elm, tag), root);
/**
* @private
*/
export const elementToItem = (elm, elementsMap) => {
const { key } = elm.dataset, { item } = elementsMap[key || ''];
return item;
};