The IbmEditorFamily of TextEditors has a history of using RexxLanguage and using it in a very particular way. Macros are sequences of built-in TextEditor commands (since all such editors have a CommandLine) surrounded by RexxLanguage control structures (IF-THEN-ELSE, DO-WHILE, etc.) and data structures (variables and stems).
Since REXX is designed to 'address' a specific command line interpreter, it sends all non-built-in commands to the command line interpreter.
This is the normal REXX way of doing things. In fact, the SUBCOM sub-command environment is a VM/CMS way of doing things that is explicitly available via REXX.
Integration toolkits are more sophisticated.
Sun had a system called ToolTalk which seemed to have a similar ambition.
Apple still supports an integration technology called AppleScript which allows for an object-oriented view of scripting application objects.
In the ACME and sam editors, the plugin doesn't really exist. Instead, the selected text becomes input to a standard unix command. The stdout forms the replacement string. Many other editors have this capability
On Microsoft Windows, compiled plugins are usually DLL files (Dynamic Link Libraries). For example, EditPlug uses DLL files written in any language (i.e. delphi or Visual C++) and loads the plugins dynamically at run time. In EditPlug, the plugins are stored in folders in the application directory, and the title of the folder is the title of the plugin that can be loaded from the plugin menu.
On Linux, compiled plugins can be DSO or SO files (similar to DLL's on windows. also known as Dynamic Shared Objects).