editor: make elements divs instead of ps

Also refactor the pre creation for errors. I think that method doesn't work.