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

HTML Toast Support #315

Closed
palmtown opened this issue Feb 8, 2022 · 1 comment
Closed

HTML Toast Support #315

palmtown opened this issue Feb 8, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists Type: Enhancement New feature or request

Comments

@palmtown
Copy link

palmtown commented Feb 8, 2022

Detailed Description

Enable the ability to pass HTML as the toast content. Note that I am using Vue 3.

Context

I would like to include a link in the toast that the user can click.

Possible Implementation

Change {{ content }} to v-html="content" in VtToast.vue ?

@palmtown palmtown added the Type: Enhancement New feature or request label Feb 8, 2022
@Maronato
Copy link
Owner

Hello @palmtown!

What you want is possible with a custom component. See #248 for an example.

Addressing your proposed implementation, v-html is a dangerous directive, much more so when used in a third party library where end users should not care about implementation details. See #306 for a discussion that explains the issue in detail.

@Maronato Maronato added the duplicate This issue or pull request already exists label Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants