Macros that don't need a closing tag are pretty straight forward by using jQuery's wiki method.
However, when trying to call a macro that requires a closing tag through JS, I'm having the following issue:
The problem is that the macro is being called twice: once to add the macro tag, and another one to close it.
I've tried using a mixture of append and prepend, but the issue remains since they are separate operations.
I've found two workarounds: the first is to obviously rewrite the macro as pure JS, which is not ideal; reinventing the wheel and all that.
The second is to call the macro and include the text within the same call, that way you can include both tags together:
This works fine, but I'd still like to see if anybody knows a way to do it while the content is already present on the document.
However, when trying to call a macro that requires a closing tag through JS, I'm having the following issue:

The problem is that the macro is being called twice: once to add the macro tag, and another one to close it.
I've tried using a mixture of append and prepend, but the issue remains since they are separate operations.
I've found two workarounds: the first is to obviously rewrite the macro as pure JS, which is not ideal; reinventing the wheel and all that.
The second is to call the macro and include the text within the same call, that way you can include both tags together:
Code:
$('#testfade').wiki('<<fadein 10s>>'+content+'<</fadein>>');