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

Custom Buttons #89

Open
JYone3A opened this issue Sep 11, 2024 · 0 comments
Open

Custom Buttons #89

JYone3A opened this issue Sep 11, 2024 · 0 comments

Comments

@JYone3A
Copy link

JYone3A commented Sep 11, 2024

Is it possible to add custom button? For example I want to add a 'save' button, but would prefer to have it in the toolbar.

Maybe in the configuration for the editor, it could be possible to set something like this:

{
    // ...
    customButtons: {
        save: 'https://example.org/...', // path to button SVG
        saveAs: 'https://example.org/...',
    },
    // ...
    buttons: [ 'select', 'free', 'save', 'saveAs', 'trash' ]
}

Clicking the button should then just send out a new CustomEvent('custom-button', { detail: 'saveAs' }) or whatever the custom button name was.

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

No branches or pull requests

1 participant