I thought that was really "basic" ;)
Attached a polished version. Extract all three files to \Masm32\MasmBasic\Plugins\
These two lines show what the editor passes to the plugin:
mov ecx, piBookmarks ; points to an array of handles
fdeb 1, "Paras received:", hRE, piHandle, piCbMain, piCbRE, piSrcType, $piContent, $Win$(piAux), $Win$(piOut), $piPath, $piOptions, $piStart, piLen, $Win$(piFind), $Win$(piReplace), piNumBM, $Win$([ecx]), $Win$([ecx+4]), piDirty
hRE handle to the main RichEdit control
piCbMain pointer to the plugin's WndProc hook (if set, there you get all messages from RichMasm's WndProc)
piCbRE same but for the subclassed RichEdit control
piContent pointer to plain text content
piAux pointer to plain text content of aux window (the Ctrl F12 thing)
piOut pointer to content of output window
piPath pointer to document path
piOptions pointer the OPT_xxx options
piStart pointer to selected plain text
piLen length of selected text
piFind handle of Find window
piReplace handle of Replace window
piBookmarks pointer to an array of the bookmark handles
Some of this is pretty useless, but it gives you an idea what is possible.