Before I start to make my first macro with a Custom HTML Prompt action, I'd like to ask whether this action will allow me to evaluate (use) the selection in a text area.
Background: For a given source term in the source segment, I'd like to display the whole, corresponding target segment and ask the user to identify the corresponding target term by selecting it in the text area.
Yes, but requires a little JavaScript. Getting Selected Text of TextArea Using JavaScript shows what you need but the alert() isn't supported in Keyboard Maestro's implementation of Webkit, which is what Custom HTML Prompt uses.
So instead of alert(), I've added a line to store the selection in a Keyboard Maestro local variable and display that in a notification when the OK button is clicked. Just type some text, make a selection and press OK.
So to elaborate a bit, you put whatever you want to display in the section of the HTML code, of course. In my example, the textarea selection variable is called localSelection. Anything selected in the textarea of my example macro will be displayed in the Notification action when you click the OK button.
In your case, you would change the HTML display from my simple textarea to whatever you want (with a textarea somewhere) and rename the variable from localSelection to TargetTerm (which is, however, a persistent global variable) and name the textarea.
Update. I took a look at your macro and folded my example into it for you: