微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

suneditor-react Typescript getContent 不工作

如何解决suneditor-react Typescript getContent 不工作

我正在使用 suneditor-reacttypescript。我想获取编辑器的内容创建PDF。但问题是当我尝试访问 SunEditor 的引用时,出现以下错误

Property 'ref' does not exist on type 'IntrinsicAttributes & SunEditorReactProps & { children?: ReactNode; }'. 

此外,我在 getContents() 中也找不到 SunEditorReactProps 道具。但它在他们的示例页面中。

enter image description here

请提出您的想法。

sunediotr-react

suneditor example page

解决方法

嗨,我是 SunEditor React 组件的作者,您可以学习如何将 ref 附加到 suneditor React 组件(在打字稿中)here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。