wangeditor
Version:
wangEditor - 轻量级 web 富文本编辑器,配置方便,使用简单,开源免费
22 lines (21 loc) • 536 B
TypeScript
/**
* @description 获取子元素的 JSON 格式数据
* @author wangfupeng
*/
import { DomElement } from '../utils/dom-core';
declare type AttrType = {
name: string;
value: string;
};
export declare type NodeType = {
tag: string;
attrs: AttrType[];
children: NodeListType;
};
export declare type NodeListType = Array<string | NodeType>;
/**
* 获取子元素的 JSON 格式数据
* @param $elem DOM 节点
*/
declare function getChildrenJSON($elem: DomElement): NodeListType;
export default getChildrenJSON;