private void SetupProvider() { try { if (EditorManager.Providers[providerName] != null) { editorProvider = EditorManager.Providers[providerName]; } else { editorProvider = EditorManager.Providers[failsafeProviderName]; } editor = editorProvider.GetEditor(); editor.ControlID = this.ID + "innerEditor"; editor.SiteRoot = Page.ResolveUrl("~/"); editor.ScriptBaseUrl = Page.ResolveUrl(scriptBaseUrl); this.Controls.Clear(); this.Controls.Add(editor.GetEditorControl()); } catch (TypeInitializationException ex) { log.Error(ex); } }
private void SetupProvider() { //TODO: need to get rid of this try catch or catch more specific try { if (EditorManager.Providers[providerName] != null) { editorProvider = EditorManager.Providers[providerName]; } else { editorProvider = EditorManager.Providers[failsafeProviderName]; } editor = editorProvider.GetEditor(); editor.ControlID = this.ID + "innerEditor"; editor.SiteRoot = Page.ResolveUrl("~/"); editor.ScriptBaseUrl = Page.ResolveUrl(scriptBaseUrl); this.Controls.Clear(); this.Controls.Add(editor.GetEditorControl()); } catch { } }