无法读取 Jodit 中未定义的 属性 'fire'

Cannot read property 'fire' of undefined in Jodit

将 jodit 添加到 projet 后出现错误。请帮助我,这是我第一次使用jodit。

这是我的代码:

       <JoditEditor
                    value={this.state.data.content}
                    config={{
                        // readonly: false,
                        buttons: [
                            'bold', 'underline', 'italic', '|',
                            'ul', 'ol', '|',
                            'outdent', 'indent', '|',
                            'font', 'fontsize', 'brush', 'paragraph', '|',
                            'align', 'undo', 'redo', '|',
                        ]
                    }}
                    onChange={this.handleEditorChange}
                />
handleEditorChange = (e) => {
    this.setState(prevState => ({
        data: {
            ...prevState.data,
            content: e
        }
    }));
};

用这个替换jodit.min.js https://github.com/rejacopyright/jodit.min.js.

在节点模块中,位置是 your_projects/node_modules/jodit/build/jodit.min.js

确保在 package.json 中设置了 "main": "build/jodit.min.js"