Making your game moddable.

Why is the Editor required for Modding? Would it not just be adding prefab Media and Code modules?