If you plan on adding layers dynamically and need all GraphicsLayers and FeatureLayers from your Map.Layers to use the same Editor, it is sufficient to supply only Editor.Map property. If you wish to include or exclude some layers, you can also supply the Editor.LayerIds property. Actually in the sample link you provided.. if you are using WPF, setting Editor.Map property through Element binding is not supported.
<esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" LayerIDs="CensusDemographics" SelectionMode="Rectangle" ContinuousMode="True" />
You need to set this property in code-behind:
Editor editor = this.LayoutRoot.Resources["MyEditor"] as Editor;
editor.Map = this.MyMap;
You can still use LayerIDs property if you wish to include only specific layers from your map. When you create the layer in code-behind, you just need to set ID property to match this.For example
FeatureLayer l = new FeatureLayer()
{
ID = "CensusDemographics",
Url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0"
};
MyMap.Layers.Add(l);