随笔分类 -  前端通用问题

摘要:一、转换方法如下: function xmlToJson(xml) { const parser = new DOMParser(); const xmlDoc = parser.parseFromString(xml, 'application/xml'); const json = parseE 阅读全文
posted @ 2025-01-08 10:07 张哲Zeo 阅读(74) 评论(0) 推荐(0) 编辑
摘要:function extractTextFromHTML(htmlContent) { // 创建一个新的DOM解析器 const parser = new DOMParser(); // 解析HTML内容为DOM const doc = parser.parseFromString(htmlCon 阅读全文
posted @ 2025-01-02 11:59 张哲Zeo 阅读(71) 评论(0) 推荐(0) 编辑
摘要:核心插件 1. mammoth : 将文档内容转化为html 2. vue2-editor:富文本编辑器 核心方法: //文件切换事件 readFileInputEventAsArrayBuffer($event){ console.log("event ==>"event); var file = 阅读全文
posted @ 2023-12-15 11:33 张哲Zeo 阅读(154) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示