As a matter of fact the textarea in which I am composing this answer supports macros. It can for you too with a little help from wasavi.
The wasavi editor is a vi work-alike that brings a large portion of vi functionality to the web. This includes macros using the usual q binding to start recording, followed by a single character to register the macro under. The next q from command mode terminates the macro recording. To replay it, hit @ followed by the character you used to identify the recording.
You may use this functionality for any text-area on the web using the browser extensions (Chrome, Firefox, Opera) or as a stand alone web-app. For the source code see the project's Github page.