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

Override QuiverA toolbar button actions with our Quiver🐝 buttons #3

Open
enjoysmath opened this issue Dec 1, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@enjoysmath
Copy link
Owner

Currently how it works is:

  • QuiverA (original) is included into Quiver🐝 using an iframe tag.
  • QuiverA is modified so that upon initialization it does: parent.quiverUi = ui; ie. it sets a global variable in Quiver🐝 to the internal reference to the QuiverA UI singleton.
  • QuiverA is modified so that it contains methods like "user_save_action()" and "user_undo_action()" in the UI class, which contain calls that are a copy/paste of what the old buttons original actions were.
  • So then a button in BSS can be set with onclick="quiverUi.user_undo_action()"

So overriding entails creating a user_xyz_action() in UI class of src/ui.js for each button and finally making the function call upon button click.

image

All these links/buttons have to be connected to a UI.user_xyz_action().

@enjoysmath enjoysmath added enhancement New feature or request good first issue Good for newcomers labels Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants