Creating in-editor tools for level creation?

So I’ve been working on a game that uses a grid alignment, and during gameplay basically you can drop blocks to a grid.

But when it comes to creating levels for the game, it’s actually harder since you cant click-to-drop the blocks to automatically ailgn to a grid, you have to mess with the coordinates etc.

I know you can use many of the same functions in the editor but I’ve never done it myself… So I’ve been wondering, would it be possible to create a tool in the editor that uses the same code to place prefabs in to the scene with my code that alligns them to a grid?

If so, could anyone please give a little guidance or referrals to the documentation I’ll need to use?

Thanks!

http://video.unity3d.com/video/3699926/unite-11-intro-to-editor

http://docs.unity3d.com/Documentation/Components/ExtendingTheEditor.html