annotorious / annotorious-v1

Project has moved to http://github.com/annotorious/annotorious
https://annotorious.com
MIT License
593 stars 142 forks source link

Adding a beforeEditorShown event. #169

Closed DavidEBest closed 7 years ago

DavidEBest commented 7 years ago

This tool is great, thanks for all the hard work!

In our application, we'd like to be able to manipulate the text shown in the popup (remove/replace formatting, etc.) before presenting it to the user for their input. To accomplish this, I've added a beforeEditorShown event that is triggered when Editor.open() is called.

I'm happy to make any stylistic changes necessary to this PR, if it isn't quite right -- or feel free to close if there is a better way to accomplish what we're looking for. :)

Thanks!