I want to create a custom shortcode.
I have a movie transcription in a foreign language. I want to create a cloze out of that text (missing words to fill in). Right now, just for demo, I just use CSS to match the text to background color and add a border-bottom: user mouses over text to check if his guess is right, which is not interactive enough. To make this more interactive I want to implement a shortcode that would surround a word or set of words, and replace it with a form field.
The actual word that it replaces would become a parameter against which the form submission would be checked. If it matches, returns a true graphic, thumbs up or green check or something. If not, it returns an error graphic.
A couple of things I need:
I need the ability to implement this shortcode several times per post via a one-click TinyMCE button.
I need the ability to manually add parameters in the shortcode that are acceptable matches but aren’t exact matches. The exact match would be the first and only required parameter.
The form fields might be submitted all at once from the bottom of the page (this button can be implemented by an additional simple shortcode).
(optional) I would like that each form field can be checked asynchronously on its own.
(very optional) both
Phase II can expand on this to a full text area form field that accepts a lot of text, and perhaps points out mismatches.
Phase two might also offer some sort of grade output, like “you got 7/10 right!” or whatever. Not needed right now.
Can you do this?