How can I inject raw html in ConfirmDialog?

UI Components for Vue
Post Reply
admin9
Posts: 2
Joined: 13 Feb 2022, 01:29

13 Feb 2022, 01:41

I read the document very carefully, but I'm new here, so please forgive me it's already written somewhere in the document.

Are there ways to inject raw html in Dialog or ConfirmDialog?
https://www.primefaces.org/primevue/sho ... firmdialog
https://www.primefaces.org/primevue/showcase/#/dialog

For instance, the following partial code didn't work.
Primevue automatically sanitize it. I know it's a good thing but sometimes I really need to inject raw html.

Code: Select all

message: `Hello! I am <b>USERNAME</b><br><br>Good to meet you!!`,
'


Also, even linefeeds didn't work as well.

Code: Select all

message: `Hello!!\n\nHi!`,
It's really inconvenient for me if it's impossible...
I would be really glad if you know the trick for this..

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

03 Mar 2022, 09:09

Hi,

It supports only string type. Still if there is more demand, we'll definitely reconsider. Thank you for your feedback.

admin9
Posts: 2
Joined: 13 Feb 2022, 01:29

26 Mar 2022, 15:09

Ohh, I see! Thanks for letting me know! I really hope such a feature will be introduced!

Searerva
Posts: 6
Joined: 15 Sep 2022, 11:55

14 Oct 2022, 11:34

This feature would be great to have! Has it moved anywhere since this?

bahadirsofuoglu
Posts: 84
Joined: 06 Sep 2022, 08:59

18 Oct 2022, 10:48

Hi,
Maybe message slot help you. You can check the code sample. The templating section will help.
https://codesandbox.io/s/5s7qqp?file=/s ... ogDemo.vue

Searerva
Posts: 6
Joined: 15 Sep 2022, 11:55

18 Oct 2022, 17:09

Templating solved this for me. Thank you!

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests