使用 ReactJS 将 html 位置转换为 docx

Converting html location to docx with ReactJS

提问人:Thành Hồ Tấn 提问时间:11/14/2023 最后编辑:Thành Hồ Tấn 更新时间:11/14/2023 访问量:23

问:

我正在网站上设计一个可编辑的地方,这些文本框供下一个用户填写信息。在此处输入图像描述

目前,我正在使用坐标来保存文本框的位置。这使我很难将 html 转换为 docx。

<div className='parent' style={{ border: "1px solid black", height: "100vh", width: "100%", display: "inline-block" }}>
                            <div>
                                {inputArrs.map((item) => {
                                    return <Draggable className='draggable' id={item.id} onStop={handleStop} onMouseDown={handleMouseMove}
                                        defaultPosition={positions === null ? { x: 0, y: 0 } : !positions[item.id] ?
                                            { x: 0, y: 0 } : { x: positions[item.id].x, y: positions[item.id].y }}><input id={item.id} key={item.id}
                                                type="text" onChange={event => handleChange(event, item.id)} value={item.value}></input></Draggable>;
                                })}
                            </div>
                        </div>
C# HTML 反应JS html转docx

评论


答: 暂无答案