A demo containing an example of the DtEditor widget (editor.c) is in /usr/dt/examples/dtwidget directory. Read the README file for detailed information on the demo.
For more information on the Text Editor widget, see the relevant man pages and Solaris Common Desktop Environment: Programmer's Guide.