aieditor-team / AiEditor

AiEditor is a next-generation rich text editor for AI.
https://AiEditor.dev
GNU Lesser General Public License v2.1
1.03k stars 99 forks source link

image 配置 customMenuInvoke自定义选择图片后,怎么插入多张图片? #54

Closed ImpChiang closed 2 months ago

ImpChiang commented 3 months ago

试过dispatch(tr.insert(selection.from,schema.nodes.image.create(src: ''))),只能是单张图插入

yangfuhai commented 3 months ago

多次循环调用 就可以呀

ImpChiang commented 3 months ago

10458 我这样循环调用,总是插入第一张,而且也报错,是selection.from 位置不变的原因吗?

ImpChiang commented 2 months ago

已解决,将多个选中图片组成image标签后拼接成一个html字符串,insert插入即可