Display SVG in a toolbar split-button

3 Answers 206 Views
Toolbar
Frank
Top achievements
Rank 1
Iron
Frank asked on 16 May 2022, 12:52 PM

Hi everyone,

is there a possibility to display SVG-Code in the drop-down list of a split-button in a toolbar. When i try to set the text attribute of the button the SVG source-code gets displayed

 

regards

Frank

3 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 27 May 2022, 07:40 AM

Hello, Frank,

Thank you for the clarification.

In the version you are using, the text option of the buttons was vulnerable to XSS attacks. Please refer to this example. Therefore we needed to escape the text which results in the behaviour you are seeing. If you wish to display an image, you can use the imageUrl, spriteCssClass or the icon options.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Martin
Telerik team
answered on 19 May 2022, 07:56 AM

Hello, Frank,

Could you please take a look at this Dojo example and let me know if that is what you are looking for?

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Frank
Top achievements
Rank 1
Iron
answered on 24 May 2022, 09:01 AM

Hi Martin,

thanks for the reply. Unfortunately this was not what i was looking for. We had such a toolbar in an older version of our software. And this was done using kendo ui version v2019.3.917. Those shapes you see in the drop-down are svg. So it used to work in that version. And i tried this in the current version of kendo ui and i cannot get it to work as you see in the following Dojo (when selecting v2019 it displays the svg an in the current version it shows the html)

Tags
Toolbar
Asked by
Frank
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Frank
Top achievements
Rank 1
Iron
Share this question
or