The Initialize method, if implemented, is called right after the object has been created and added to the editor's controls collection. The object can use this method to setup things for the tool and to attach to various editor events, for example the PreRender event to extend the editor right-click menu.

Namespace:  EPiServer.Editor.Tools
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236


void Initialize(
	HtmlEditor editor


Type: EPiServer.Editor..::.HtmlEditor


The following sample plugin modifies the editor's width and height settings runtime in the Initialize method of the IInitializableTool interface. It does only execute on the server, at the time when all plugins are initialized by EPiSever.
using System;
using System.IO;
using System.Web.UI.WebControls;

using EPiServer.Editor;
using EPiServer.Editor.Tools;

namespace CodeSamples
   public class ChangeEditorSettings : ToolBase, IInitializableTool
      void IInitializableTool.Initialize(HtmlEditor editor)
         editor.EditorAreaWidth = Unit.Pixel(600);
         editor.Height = Unit.Pixel(100);

See Also