Cannot read property 'unbind' of undefined
See original GitHub issueI installed "@tinymce/tinymce-react": "^2.3.0",
I wrote my own component following the documentation
import React from "react";
import { connect } from "react-redux";
import { Editor } from "@tinymce/tinymce-react";
/**Actions */
import { editorOnChange } from "../../../actions";
class CKEditor extends React.Component {
handleEditorChange = (content) => {
const {
id,
editorOnChange,
reducer: { actionType },
} = this.props;
editorOnChange(actionType, id, content);
};
render() {
return (
<Editor
apiKey="8g8nxiiua9o6rxmlgdkupdq0cwtn4ws1819v8typvr8opxb0"
init={{
plugins:"powerpaste",
toolbar:
"formatselect | paste | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | fontselect | fontsizeselect",
font_formats:
"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Helvetica=helvetica;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;Akzidenz-Grotesk Std=Akzidenz-Grotesk Std",
}}
value={this.props.value}
onEditorChange={this.handleEditorChange}
/>
);
}
}
const mapDispatchToProps = {
editorOnChange,
};
export default connect(
null,
mapDispatchToProps,
)(CKEditor);
I use this component at least at 3 different pages. When i’m load this component at first, it’s all ok, no crashes, but when i want to change page to another, where editor component is use too, i have a crash and error at console
Uncaught TypeError: Cannot read property 'unbind' of undefined
at Yx.<anonymous> (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:76)
at Jg.c.fire (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
at Yx.fire (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
at rp (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
at qx (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
at Yx.remove (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
at Object.remove (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
at Editor.componentWillUnmount (Editor.js:71)
at callComponentWillUnmountWithTimer (react-dom.development.js:14280)
at HTMLUnknownElement.callCallback (react-dom.development.js:100)
It only happens when there is plugins property available. If i remove it, everything works good
Version of Tiny - "@tinymce/tinymce-react": "^2.3.0",
I updated api key to premium, but the problem has not disappeared
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
JavaScript error: Uncaught TypeError: Cannot read property ...
So querySelectorAll returns an empty NodeList which has undefined at the 0 position (or any position for that matter). Breakdown of what is...
Read more >How to deal or remove "Cannot read property 'destroy' of null"
"Cannot read property 'destroy' of null" - This error has occurred because the underlying js implementation gets failed to initialize the global ...
Read more >Error: Cannot read properties of undefined (reading 'remove ...
My issue is that when I press the next button, I get the following error. Error: Cannot read properties of undefined (reading 'remove')....
Read more >Uncaught TypeError: Cannot read property 'remove' of ...
Hey, you first need to know what is undefined, the remove is trying to do it's thing in something that is not defined,...
Read more >uncaught type error cannot read property set attribute of ...
Remove console error “Uncaught TypeError: Cannot read properties of undefined (reading 'setAttribute')”. Save ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have found the root of the problem and will release a new version of powerpaste with the fix soon.
Never mind. Source-tree was not able to detect the changes, but Beyond Compare does.
Thanks
On Wed, Nov 21, 2018 at 11:11 AM Einar Paul Qvale < einar.paul.qvale@gmail.com> wrote: