cycleccc

Results 340 comments of cycleccc

打开 wangeditor 的 index.d.ts 里 也没有吗,版本是 5.1.23 最新版吗

v3版本好多年前了,要不换成v5?

https://juejin.cn/post/7069548140294045709 https://github.com/wangeditor-team/wangEditor-plugin-mention 按照双越老师写的例子试试?

![image](https://github.com/wangeditor-team/wangEditor/assets/62703840/fae8429e-16a2-4211-8c05-e6a44c30ba20) 官方推荐使用 --bracket-same-line 代替 [pretttier document](https://prettier.io/docs/en/options.html#deprecated-jsx-brackets)

每个菜单按钮都有自己的置灰条件,在 isDisabled 方法中,如 改变字体颜色的菜单的置灰条件就如下 ![image](https://github.com/wangeditor-team/wangEditor/assets/62703840/76abd882-fb83-43d7-9cf3-f557bf8a7ed1) 可能是你写的扩展被 Editor.isVoid 捕获到了。isVoid 的 逻辑写在 slate 的源码中 是用来判断 该node的type是否在合法的type(基础的type中)中,不是则返回true。

想要支持编辑基础type之外的其它type可能要修改源码,比如现在的video就不支持居左居右布局,我研究一下,有需要的话可以关注一下 [wangeditor-next](https://github.com/cycleccc/wangEditor-next),我会在这里更新支持。

@LXMsaal 自定义字体颜色看定要套用原来的逻辑的,具体你可以看wangeditor table module 里嵌套的文字是怎么做的。

@congbiqi @nickGaooooooooooo 有试过给 div 加上 @mousedown.prevent 阻止浏览器默认的选择行为吗?

![image](https://github.com/wangeditor-team/wangEditor/assets/62703840/d6b7619c-5611-47c4-a739-6782e0ddb858) packages\basic-modules\src\modules\image\menu\EditImage.ts 这在源码中是写死的,menu配置也没有给出这一快的配置,你可以参考[自定义菜单](https://www.wangeditor.com/v5/development.html#buttonmenu),自定义菜单

简单粗暴点的话可以直接修改wangeditor源码中的css文件后重新打包引用 packages\basic-modules\src\constants\icon-svg.ts