Skip to content

Commit

Permalink
fix-undo-missconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
abelpz committed Jan 9, 2024
1 parent 6c1c13c commit 71573a9
Show file tree
Hide file tree
Showing 5 changed files with 15,451 additions and 21,823 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ yalc.lock
# System Files
.DS_Store
Thumbs.db

#nx files
.nx
2 changes: 1 addition & 1 deletion packages/base/src/components/Buttons/ButtonRedo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function ButtonRedo({ component, children, ...props }) {
);
const redo = useCallback(
(e) => {
epiteleteHtml.redoHtml(bookCode);
epiteleteHtml.redo(bookCode);
},
[epiteleteHtml, bookCode]
);
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/components/Buttons/ButtonUndo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function ButtonUndo({ component, children, ...props }) {
);
const undo = useCallback(
(e) => {
epiteleteHtml.undoHtml(bookCode);
epiteleteHtml.undo(bookCode);
},
[epiteleteHtml,bookCode]
);
Expand Down
6 changes: 6 additions & 0 deletions packages/base/src/components/useEditorState.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ export default function useEditorState({
writeOptions
);
};
epiteleteHtml.undo = (bookCode) => {
return epiteleteHtml.undoHtml(bookCode, readOptions);
};
epiteleteHtml.redo = (bookCode) => {
return epiteleteHtml.redoHtml(bookCode, readOptions);
};
const unobserveHtml = epiteleteHtml?.observeHtml(({ data: htmlPerf }) =>
setHtmlPerf(htmlPerf)
);
Expand Down
Loading

0 comments on commit 71573a9

Please sign in to comment.