Open DIYCCC opened 7 months ago
main code
editorRef.current = new Editor({ el: document.querySelector("#editorjs"), events: { change: () => { const a = editorRef.current.getMarkdown(); const bbbbb = editorRef.current.getHTML(); console.log("aaaaaa", a); console.log("inputHistory"); if (!undoOrredoStatus.current) { inputHistory.inputChanged(a); } else { // 由于setMarkdown会进入onchange两次所以坐如下处理 if (undoOrredoStatusNum.current === 1) { undoOrredoStatus.current = false; undoOrredoStatusNum.current = 0; } else { undoOrredoStatusNum.current += 1; } } }, }, });
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here. ![Uploading image.png…]()