canvas-editor icon indicating copy to clipboard operation
canvas-editor copied to clipboard

如果 想替换某个区域的 文字 或者 表格数据 如何替换

Open zhouchangmin opened this issue 2 years ago • 3 comments

What problem does this feature solve?

如果 想把已经存在某个区域的文字 或者 表格数据,替换成业务的最新数据 该怎么办??还有 不能给 table或者其他标签 增加 类似于data-src 这种属性参数吗 方便定制

What does the proposed API look like?

非常感谢 大佬的 产品 看到了希望 希望大佬 能进一步 完善功能 如果 想把已经存在某个区域的文字 或者 表格数据,替换成业务的最新数据 该怎么办??还有 不能给 table或者其他标签 增加 类似于data-src 这种属性参数吗 方便定制

zhouchangmin avatar Aug 04 '23 05:08 zhouchangmin

需进一步完善使用场景

Hufe921 avatar Aug 04 '23 12:08 Hufe921

Hello, in my case it would be interesting if I could specify on which page some data will be added, for example: add a signature on a specific page.

I imagine that one more parameter can be added to the executeSetValue() function. Or in the data structure (IElement) there is an option to determine the page where this data will be added. I imagine that the first option is easier to implement and convenient for the api.

What should be more difficult is determining the position that the data to be inserted will occupy within the page, for example: first position/last position, or in some specific position within the page.

What do you think about this?

douglasmatheus avatar Aug 11 '23 13:08 douglasmatheus

Hello, I made a function to find/select a text element according to the id provided, and also another implementation to search and replace the text of an element also by the id.

Would you like me to send PR for evaluation?

douglasmatheus avatar Sep 15 '23 14:09 douglasmatheus