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

Revert most of https://github.com/elkarte/Elkarte/pull/2318 #2919

Closed
Spuds opened this issue Apr 25, 2017 · 5 comments
Closed

Revert most of https://github.com/elkarte/Elkarte/pull/2318 #2919

Spuds opened this issue Apr 25, 2017 · 5 comments
Labels
Milestone

Comments

@Spuds
Copy link
Contributor

Spuds commented Apr 25, 2017

remove undo and redo plugins for the editor. No one is going to take the time to fix them.

@Spuds Spuds added the block label Apr 25, 2017
@Spuds Spuds added this to the 1.1 RC 2 milestone Apr 25, 2017
@emanuele45
Copy link
Contributor

Looking at the recent changes, the undo plugin received a couple of little tweaks:
samclarke/SCEditor@e7b230c#diff-12899573d29acca372814c3c7eb5d860
samclarke/SCEditor@18a6834

I'm not sure how relevant the first is, but apparently using the "current" version instead of ours makes the undo way better:

  • the bug I reported at http://www.elkarte.net/community/index.php?topic=4393.0 is fixed,
  • the ctrl+z goes back to the fist hit of the backspace, not perfect, but it's a huge improvement in comparison to just delete everything.
    Do you see any problem in just commit the latest version in our repo?
    And would you be able to do it? Because I don't know how you do the minification... 😊

@Spuds
Copy link
Contributor Author

Spuds commented Jun 4, 2017

The first is part of the dropping of jquery as a dependency for the editor, so we can't use that unless we do a somewhat massive overhaul of all other plugins (mention, draft, ila, etc) I just can't justify that work since it really does not buy us a thing in 1.1 and will just be a time suck.

I do have a editor branch were I backported a lot of the offical fixes in to a version of the editor that still used jquery https://github.com/Spuds/SCEditor/tree/Elk_Branch_1.5.3 this has the second change to the undo as well. I should troll for any other updates that we can pull back and pack this up and install it on the site to make sure there are no issues.

@emanuele45
Copy link
Contributor

@Spuds what would you think about this:
https://gist.github.com/emanuele45/157db026b083f08360d762cf396cd997

I removed the redoState (mostly, I have the declaration that is a leftover) and used a cursor over the undoState to keep track of where we are. It seems to me an easier and cleaner solution than pop and shit stuff around from arrays.
If it works, I can clean it up and propose it upstream.

@emanuele45
Copy link
Contributor

@Spuds did you by chance incorporate the undo tweak I made?

@emanuele45 emanuele45 modified the milestones: 1.1 Final, 1.1 RC 2 Aug 26, 2017
@Spuds
Copy link
Contributor Author

Spuds commented Aug 26, 2017

Of course ... but then I did not commit it to the ElkArte repo Doh! 😇 I'll PR it to close this issue for now.

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

No branches or pull requests

2 participants