Attaching details on selected text

For structured text content we would like to have a feature like below:

  • Editor will select some text. On selecting text the toolbar will appear. From there the editor will click an icon. Clicking the icon will show an input box. The editor will put some text on the input box and will be able to save it. So the input text will be attached with the selected text.

Jyotirmoy Biswas

Hi @jyoti,

Thank you for the suggestion. May I ask, please, what the use case would be for this? It would help us understand what you’re needing this for :slight_smile:

How would this “additional text on top of text” be displayed to your editors in DatoCMS? What should the API return look like, and how would it be rendered on your website frontend?

Hi @roger ,

We need this for the functionality like “Pop-up box to explain a word”.

On datocms:

  • The box will disappear, if the editor attach the additional text and click save.
  • On the structured text editor the selected text will be shown with grey colour and if the editor mouse over the text then the attached text will appear. It is similar to attaching link to certain text.


  • On api it could be presented like the type “link”. Could be some different name of the “type”.

On website:

  • The full structured text will be rendered. The targeted text will be marked. If the visitor clicks the marked text then the popup box will appear with the details additional text.

Jyotirmoy Biswas