You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, @JiHong88 . First I need to say that I LOVE your rich text editor. I had a lot of headache with the popular ones, but neither of them work as I needed. Suneditor is a bless. Thank you very much.
Describe the bug
I am facing an error that prints on console only about charCounter funcionallity. But if you close the error, it is working normal(great).
It looks that 'context.element' is undefined, but I didnt understand why because you already did a condicional check for its existance before:
I am using these versions(I believe its the latest ones):
"suneditor": "^2.45.1",
"suneditor-react": "^3.6.1",
To Reproduce
I am using nextjs with react-hook-form.
The value its recieved is an useState variable from the component that is using RichTextEditor
Greetings, @JiHong88 . First I need to say that I LOVE your rich text editor. I had a lot of headache with the popular ones, but neither of them work as I needed. Suneditor is a bless. Thank you very much.
Describe the bug
I am facing an error that prints on console only about charCounter funcionallity. But if you close the error, it is working normal(great).
It looks that 'context.element' is undefined, but I didnt understand why because you already did a condicional check for its existance before:
I am using these versions(I believe its the latest ones):
To Reproduce
I am using nextjs with react-hook-form.
The value its recieved is an useState variable from the component that is using RichTextEditor
my editor code:
`
//start
export const RichTextEditor = ({ value, onChange }: RichTextProps) => {
const handleEditorChange = (content: string) => {
onChange({ text: getContentText(content), html: content });
};
const getContentText = (content: string) => {
const tempDiv = document.createElement("div");
tempDiv.innerHTML = content;
return tempDiv.innerText;
};
return
<SunEditor
onLoad={() => {
const editorLabels = document.querySelectorAll(".sun-editor label");
//end
`
Expected behavior
there is no need to this console error be displayed, because its working normal.
Screenshots
Observation: the suneditor is inside a Drawer(ChakraUI drawer)
The text was updated successfully, but these errors were encountered: