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

Fixes #6 canvas editing GUI didn't work for Igor and later #7

Merged
merged 1 commit into from Jan 7, 2024

Conversation

msakuta
Copy link
Owner

@msakuta msakuta commented Jan 7, 2024

Fixes #6, SketchCanvas editor GUI stopped working since Igor, due to some changes in the way forms are handled.
Specifically, these changes were incompatible:

  • HTML_EDIT_FORMSELECTION event is not invoked anymore.
  • New EDIT_FORM_ADDTEXTAREA event uses a new Form class instead of Doku_Form, which completely changes API.

Previously, we injected a canvas and its accopanying small JavaScript code to synchronize the text area and the canvas. However it is no longer possible to directly inject text into the output HTML. We need a specific implementation of Element class.

In order to keep backwards compatibility, HTML_EDIT_FORMSELECTION was left intact, and added a new EDIT_FORM_ADDTEXTAREA handler with the custom CanvasElement class.

Tested on:

  • Igor
  • “Jack Jackrum”
  • “Hogfather”
  • “Greebo”

@msakuta msakuta merged commit 9565b77 into dokuwiki Jan 7, 2024
@msakuta msakuta deleted the fix-canvas-edit branch January 7, 2024 08:23
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

Successfully merging this pull request may close these issues.

Fails with DW 2022-07-31a "Igor" because of a breaking change.
1 participant