Web Plugin: Select Text In Widget

  • 2 June 2021
  • 3 replies

Badge +1


I am developing a web plugin for Miro. 

I want to select text inside a TextWidget. (As shown below)

Couldn’t find any documentation if it possible to highlight text inside a widget

Any suggestions?


3 replies

Userlevel 4
Badge +6

Hi @Abhijeet Narvekar,


It is not possible with the Web SDK to “select” a text of a Text widget.

You can highlight text in the widget by using HTML like:

await miro.board.widgets.create({type: "text", text: "example <span style=\"background-color: rgb(254, 244, 69);\">hello world!</span>"})


Which will look like: 


I would love to hear about your use-case: what are you trying to do by having pre-selected text? I will then be able to share it with our Product Managers :)  

Badge +1

@Anthony Roux Thanks for the suggestion. But that won’t help with our use case. We don’t want to make permanant change to the widget content.

We are Acrolinx a content governanace solution. The plugin would be suggesting users on how they can improve content quality in Miro. For showing suggestions we need to highlight the text content based on offsets. 

We have our own sidebar app where we show results. We want to highlight those results on Miro widgets. (See screenshot)

We have a several integrations across a wide range of editors. Most of them provide us with some API to select text content. Would it be possible for Miro to provide such an API ?


P.S. Also do you know if we can get hold of the editor object which Miro uses for text editing? When a user clicks into the widget a text editor is activated. If we can get hold of that editor or invoke the editor through the API we could probably highlight using DOM operations

Userlevel 4
Badge +6

Thanks for sharing.

I have shared with the Product Managers to be added to our backlog and prioritised in the future. Unfortunately, this is not something that we will offer in the coming weeks.


I will inform you when I have more information about this request.