Is there a way to expand right sidebar programically in a webapp plugin?

I haven’t used Quill personally for any projects, but I believe this might work, if you use this in your function:

MyEditor.modules = {
  toolbar: {
    container: "#[nameoflocation]",
    'image-tooltip': true,
    'link-tooltip': true,
    handlers:{
      [yourhandler]: [yourhandler]
    }
  }
}

And of course, the container properties within the toolbar module can be changed to fit your needs.