Javascript 导出对word作出反应-超链接以放置在同一文档中
我用简单的js代码创建了word文件,将其转换为html并下载Javascript 导出对word作出反应-超链接以放置在同一文档中,javascript,reactjs,ms-word,export,Javascript,Reactjs,Ms Word,Export,我用简单的js代码创建了word文件,将其转换为html并下载 让HTMLContent=exportToWord(模拟器,选项); const dir=“ltr”; const docTitle=simulator.name; 常数头= ` ` + ` ${docTitle}`; const footer=“”; const sourceHTML=`${header}${HTMLContent}${footer}`; const source=`data:application/vnd.ms-
让HTMLContent=exportToWord(模拟器,选项);
const dir=“ltr”;
const docTitle=simulator.name;
常数头=
` ` +
`
${docTitle}`;
const footer=“”;
const sourceHTML=`${header}${HTMLContent}${footer}`;
const source=`data:application/vnd.ms-word;字符集=utf-8,${encodeURIComponent(
源HTML
)}`;
const fileDownload=document.createElement(“a”);
document.body.appendChild(文件下载);
fileDownload.href=source;
fileDownload.download=`${docTitle}.doc`;
文件下载。单击();
document.body.removeChild(文件下载);
文件已创建,一切正常。
问题是我想在文件中创建指向word文档中其他位置的链接
我怎么做