Inserting a widget inside a text block

How do I add a widget as the inline decorator? Can you point out the steps?