Editor and Runtime versions of the same plugin/library ?

Search engine source for #if WITH_EDITOR examples.

If you want to use UnrealEd classes you have to create another module to include and use Editor dlls tho.