Open jianhao opened 10 months ago
更新一下判断图片插件的方式: 原来是通过name判断:
const imgPluginIndex = MdEditor?.plugins?.findIndex((item: any) => item?.comp?.name === 'Image')
编译后class 的 name 会被改写,更新为通过插件名称判断
const imgPluginIndex = MdEditor?.plugins?.findIndex(
(item: { comp: { pluginName: string } }) => item?.comp?.pluginName === 'image'
)
功能描述
可以支持自定义插件或者内置插件的位置自定义么? 例如:比如我新增了一个上传文件插件,希望放到图片上传后边,目前只可以选择左右,不能具体选择位置。
建议思路
比如暴露一个方法,可以在初始化之前,对插件位置排序。
目前 hack 解决方式