braft-editor
braft-editor copied to clipboard
BraftEditor.createEditorState('<p>Hello <b>World!</b></p>'),初始化,给一个值就报错啊....
index.js:13281 uncaught at sagaWithCatch TypeError: editorState.setConvertOptions is not a function at Function.editor_BraftEditor.createEditorState.external_draft_js_.EditorState.createFrom [as createEditorState]
我这里也报错 有人遇到过吗
检查node_modules是否存在多个版本的draft-js,或者安装过别的基于draft-js的包?
有什么解决办法了,我也遇到同样的问题,,
唯一的办法,就是node_modules下面只放一个draft-js,其他改成peer的依赖方式
检查node_modules是否存在多个版本的draft-js,或者安装过别的基于draft-js。
删除重装就好了
从package.json里删除 draft-js , 然后 npm uninstall draft-js
我就是如此解决的
antd 4.15.6,braft-editor 2.3.9,依赖全部删了重装也不管用
antd 4.15.6,braft-editor 2.3.9,依赖全部删了重装也不管用
记得把package-lock里的版本也改成一样的