The Rich Text Editor is build on tiny-mce. You can modify the widget and run a command from javascript. This inserts text on the cursor position.
tinyMCE.execCommand ('mceInsertContent'
, (see doc)
The most generic way to do this is call a microflow from the widget that returns a string. In that case you are free to open a select form, read a snippet from the database.