How do I use an editor in offline, single web pages.

I want to use an editor in a local HTML page, like this

<div id="editor"></div>

How should I write code?

Is it necessary to have NMP? No need, can we do it.

Can u please elaborate a bit more so people can understand what do u realy need?