Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl + Z and Ctrl + Y shortcuts not working in CodeJar #1

Closed
Abneco opened this issue Dec 27, 2022 · 5 comments
Closed

Ctrl + Z and Ctrl + Y shortcuts not working in CodeJar #1

Abneco opened this issue Dec 27, 2022 · 5 comments

Comments

@Abneco
Copy link

Abneco commented Dec 27, 2022

Hello

I am currently using CodeJar for a project and I am having trouble getting the "Supports undo/redo" feature to work. No matter how many times I try the Ctrl + Z and Ctrl + Y keyboard shortcuts, the actions I take in the code editor are not being undone or redone.

Could you please provide me with some guidance on how to troubleshoot this issue? I would really appreciate any help you can offer.

Best regards,
Abneco

@julianpoemp
Copy link
Owner

Hi @Abneco,

sorry for the late response and happy new year!

I'm sorry, but redo/undo seems not to work in CodeJar (see antonmedv/codejar#79).

You could try to implement redo/undo for yourself (two arrays (one for redo, one for undo), add items to undo stack on keyup and paste, retrieve item either from undo/redo stack if a shortcut is triggered).

I'm thinking about fixing this issue in ngx-codejar because the CodeJar project itself seems not to be updated in time.

@julianpoemp
Copy link
Owner

@Abneco I created an PR that fixes the undo/redo issue in CodeJar: antonmedv/codejar#91 As soon as this is merged and published it should also work in ngx-codejar. Undo shortcut is CTRL + Z and redo CTRL + SHIFT + Z.

@Abneco
Copy link
Author

Abneco commented Jan 8, 2023

Hello, Thank you for your work on solving the undo/redo problem in CodeJar. I'm testing this as soon as it comes out. thanks again

@julianpoemp
Copy link
Owner

@Abneco I uploaded my fix for the redo/undo issue to a temporary Github repository. That way we don't have to wait any more until this issue is fixed in the main repository. You can install it easily:

npm install --save julianpoemp/codejar-fixed-redo-undo --legacy-peer-deps

Repository: https://github.com/julianpoemp/codejar-fixed-redo-undo

@julianpoemp
Copy link
Owner

@Abneco redo/undo issue is officially fixed 🎉. Please install the latest version of codejar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants