Make it work with Redactor 9

Plugin doesn't work with Redactor 9 version. Need to port it to newer version.