[英]TinyMCE 5: Add custom attribute to toolbar button
Is there a way to add a custom attribute to a toolbar button / custom toolbar button? 有没有一种方法可以向工具栏按钮/自定义工具栏按钮添加自定义属性?
I'm doing some tests and I need to get those buttons by custom attributes. 我正在做一些测试,我需要通过自定义属性来获取这些按钮。
Thanks 谢谢
There isn't a way at the moment, no, although it is something we've considered to make our tests easier to write. 目前没有办法,没有办法,尽管我们已经考虑过使测试更容易编写。
For the moment we use the aria-label
to find buttons (eg querySelector for button[aria-label="Remove link"]
) although that does mean our tests can only run in one language. 目前,我们使用
aria-label
查找按钮(例如button[aria-label="Remove link"]
querySelector),尽管这确实意味着我们的测试只能以一种语言运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.