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

Allow users to specify a custom class to add to generated HTML elements #24

Open
glutanimate opened this issue Nov 15, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@glutanimate
Copy link
Owner

It would be neat for users to be able to create custom buttons that both create an HTML element and equip it with a predefined CSS class. Coupled to Anki's templatting system, this would grant advanced users a very powerful tool to customize their card formatting.

Implementation specs:

  • expand the add-on configuration with an additional action key that allows users to specify a CSS class for a button
  • add a function that's capable of applying/removing that CSS class on selected text
  • hook everything up, so that clicking on a button with a CSS class set does the following:
    • if formatting in question present: Remove formatting and CSS class
    • if formatting in question not present: Apply formatting and CSS class
@glutanimate glutanimate added enhancement New feature or request help wanted Extra attention is needed labels Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant