How to use <<redo>> in javascript

Hi,

I hope you guys are doing well.

As mentioned in the title, I am wondering how to call <<redo>> in javascript.

I dug through the cookbook but couldnt find anything - but maybe I am just blind.

If triggering <<redo>> in js is not possible I will just switch back to cyrusfirheir’s Live Update macro.

Thank you for your time!

1 Like

You can programmatically invoke <<redo>> from JavaScript in a number of ways. Here are some examples of a few of them.

Using jQuery.wiki()

$.wiki('<<redo>>');
$.wiki('<<redo "a-tag b-tag">>');

Using the classic new Wikifier()

new Wikifier(null, '<<redo>>');
new Wikifier(null, '<<redo "a-tag b-tag">>');

Using <jQuery>.trigger()

$(document).trigger(':redo');
$(document).trigger({
    type   : ':redo',
    detail : { tags : [ 'a-tag', 'b-tag' ] }
});

Using jQuery.event.trigger()

$.event.trigger(':redo');
$.event.trigger({
    type   : ':redo',
    detail : { tags : [ 'a-tag', 'b-tag' ] }
});
2 Likes

Thanks alot!