Now i use MessageService to show message to the users. But it seems the MessageService can only show text message. Is there any way to put some Doms (such as buttons and hyperlinks) in the message panel?
[original thread by AlwaysMing]
Now i use MessageService to show message to the users. But it seems the MessageService can only show text message. Is there any way to put some Doms (such as buttons and hyperlinks) in the message panel?
[original thread by AlwaysMing]
cc @alex-tugarev ?
[Hanksha]
Last time I’ve used it you could only add buttons via Message.actions
and a string message.
@ppeiming-mo the default implementation of the MessageService
only accepts a string
as a message for security reasons (such as JavaScript injection): https://github.com/eclipse-theia/theia/pull/7289. It is possible however at the moment to add new buttons in the form of actions
.
If you require adding HTML in your MessageService
you will have to rebind it in your own extension to support that capability.