Hey Rom, I don't know if this can partly help you, but check this one if you can take an idea from it
https://www.deviantart.com/jimking/art/ ... -481753042As I understand that you want to overwrite the editor build-in settings and do it all through js, but using the above example you will use not only the code but play with the "Switch Animation" duration and effect of the Editor.
@yereverluvinuncleber creates widgets using only js code but I don't remember which of his widgets use the slide function..
_________________
...and remember: don't take life too seriously...My profile on Deviantart:
http://jimking.deviantart.com/