Making plugin to work without Image plugin

Adding extended parameters to editor.addCommand function 
Also replacing the pluginName with a variable