// New creates and returns an Editor Plugin instance func New(cfg ...config.Editor) *Plugin { c := config.DefaultEditor().Merge(cfg) e := &Plugin{enabled: true, config: &c} return e }
// Editor is just a shortcut for github.com/kataras/iris/plugin/editor.New() // returns a new (Editor)Plugin, it's exists here because the typescript plugin has direct interest with the EditorPlugin func Editor(username, password string) *editor.Plugin { editorCfg := config.DefaultEditor() editorCfg.Username = username editorCfg.Password = password return editor.New(editorCfg) }